v1.15.2 Latest Latest

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 0


Integration Test Framework

The integration test framework for Antrea multi-cluster is mainly using envtest which is provided by controller-runtime. There is an online book about kubebuilder that describes a few steps about how to configure envtest for integration tests. envtest supports using an existing cluster to run integration test by setting a config USE_EXISTING_CLUSTER. In Antrea multi-cluster, we choose to use an existing cluster to run tests with a real control plane and dependent controllers like Service, Endpoints controllers etc.

Running the Antrea Multi-cluster Integration tests

The tests must be run on an real Kubernetes cluster. At the moment, you can simply run make test-integration in antrea/multicluster folder. It will create a Kind cluster named antrea-integration and execute the integration codes.

if you'd like to run the integration test in an existing Kubernetes cluster, you can save your kubeconfig file as mc-integration-kubeconfig in /tmp directly, the integration test codes will read the file /tmp/mc-integration-kubeconfig by default, then run below commands:

export KUBECONFIG=/tmp/mc-integration-kubeconfig
kubectl create namespace leader-ns
kubectl apply -f test/integration/cluster-admin.yml
go test -coverprofile=../.coverage/coverage-integration.txt -covermode=atomic -cover

You should be able to see the overall results from terminal, if you'd like to check more details, you can go check the file .coverage/coverage-integration.txt.


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