Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,23 +20,27 @@ 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
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 \
Expand All @@ -47,20 +53,23 @@ 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
kind create cluster --name kind-3 --config cluster-config-interdomain.yaml --wait 120s
```

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
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
Expand Down
Loading