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: 12 Imported by: 0


Running the Antrea Multicluster end-to-end tests

Creating the test Kubernetes ClusterSet

The tests can run either on an actual Kubernetes ClusterSet or a ClusterSet with Kind clusters, and there must be three clusters. You can create the clusters using kubeadm or following the e2e test instructions or through other ways.

By default, the three clusters used in the e2e tests are called leader, west and east. If you plan to use your own existing Kubernetes clusters, please make sure you save kubeconfig files for three clusters with the same name as cluster's name, and Service CIDR of each cluster must not overlap. For example, Service CIDRs could be,, and for three clusters.

Running the tests

Make sure that your clusters are provisioned and the Antrea build artifacts are uploaded to all the Nodes. If you install the Multi-cluster Controller manually, you can run the tests from the top-level directory with go test -v antrea.io/antrea/multicluster/test/e2e --mc-gateway or run bash ci/jenkins/test-mc.sh --testcase e2e --mc-gateway. If you'd like to run test with Kind clusters, you can run bash ci/jenkins/test-mc.sh --testcase e2e --mc-gateway --kind. The command will create three Kind clusters and deploy Multi-cluster Controllers into the Kind clusters before running e2e tests.

When you use test-mc.sh, make sure your kubeconfig files of the clusters are placed in the right path. The default path is ${MULTICLUSTER_KUBECONFIG_PATH}. Please change the parameter MULTICLUSTER_KUBECONFIG_PATH to the right path where you place kubeconfig files. Sample commands are like below:

export WORKSPACE=`pwd`
DOCKER_REGISTRY="$(head -n1 ci/docker-registry)"
./ci/jenkins/test-mc.sh --testcase e2e --registry ${DOCKER_REGISTRY} --mc-gateway [--kind]

Notes: if you pass --kind, test-mc.sh will write kubeconfig files to the given path ${MULTICLUSTER_KUBECONFIG_PATH} automatically.




This section is empty.


This section is empty.


func IsDirEmpty

func IsDirEmpty(name string) (bool, error)

IsDirEmpty checks whether a directory is empty or not.


type MCTestData added in v1.6.0

type MCTestData struct {
	// contains filtered or unexported fields

type TestOptions

type TestOptions struct {
	// contains filtered or unexported fields

Jump to

Keyboard shortcuts

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