go-integration-coverage

command module
v0.0.0-...-f386e6c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

skaffold-go-integration-coverage

Example showing how to use Skaffold and ko to collect coverage profiles from integration tests, often called end-to-end tests, for Kubernetes workloads written in Go.

For a detailed explanation of how this example works, see the tutorial Go integration test coverage profiles on the Skaffold website.

Requirements

  • Go v1.20 or later
  • Skaffold v2 or later

Usage

  1. If you are using a remote Kubernetes cluster, configure Skaffold to use your image registry:

    export SKAFFOLD_DEFAULT_REPO=[your image registry, e.g., gcr.io/$PROJECT_ID]
    

    You can skip this step if you are using a local Kubernetes cluster such as kind or minikube.

  2. Build the container image with support for coverage profile collection, deploy the Kubernetes resource, run the integration tests, and collect the coverage profile data:

    skaffold run --profile=coverage
    

    The coverage profile data files will be in the directory reports.

Cleaning up

When you are done, remove the resources from your cluster:

skaffold delete

References

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL