diff --git a/README.md b/README.md index 20c8caf05..749340ea5 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,13 @@ How to run integration tests locally? ## Single cluster tests 1. Create kind cluster: + ```bash kind create cluster --config cluster-config.yaml --wait 120s ``` 2. Run tests + ```bash export CLUSTER_CIDR="172.18.1.128/25" # for monolith suite go test -count 1 -timeout 2h30m -race -v ./tests_single @@ -18,11 +20,13 @@ go test -count 1 -timeout 2h30m -race -v ./tests_single ## Calico single cluster tests 1. Create kind cluster: + ```bash kind create cluster --config cluster-config-calico.yaml ``` 2. Apply calico: + ```bash kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/tigera-operator.yaml kubectl create -f https://raw.githubusercontent.com/projectcalico/vpp-dataplane/ba374a0583d8ab7938d0e46056c148563ee911ec/yaml/calico/installation-default.yaml @@ -30,11 +34,13 @@ kubectl apply -k calico ``` 3. Wait for a calico-vpp rollout: + ```bash kubectl rollout status -n calico-vpp-dataplane ds/calico-vpp-node --timeout=5m ``` 4. Run tests: + ```bash go test -count 1 -timeout 1h30m -race -v \ ./tests_single/basic_test.go \ @@ -47,6 +53,7 @@ kubectl rollout status -n calico-vpp-dataplane ds/calico-vpp-node --timeout=5m ## Multiple cluster scenario(interdomain tests) 1. Create 3 kind clusters: + ```bash kind create cluster --name kind-1 --config cluster-config-interdomain.yaml --wait 120s kind create cluster --name kind-2 --config cluster-config-interdomain.yaml --wait 120s @@ -54,6 +61,7 @@ kind create cluster --name kind-3 --config cluster-config-interdomain.yaml --wai ``` 2. Save kubeconfig of each cluster(you may choose appropriate location) + ```bash kind get kubeconfig --name kind-1 > /tmp/config1 kind get kubeconfig --name kind-2 > /tmp/config2 @@ -61,6 +69,7 @@ kind get kubeconfig --name kind-3 > /tmp/config3 ``` 3. Run interdomain tests with necessary environment variables set + ```bash export KUBECONFIG1=/tmp/config1 export KUBECONFIG2=/tmp/config2