Skip to content

Commit 397bb8c

Browse files
Update CONTRIBUTING.md - Add steps about how to debug e2e tests locally
1 parent f52fce0 commit 397bb8c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,26 @@ Following the targets that can be used to test your changes locally.
6969

7070
**NOTE** To use the `make lint` is required to install `golangci-lint` locally. More info: https://github.com/golangci/golangci-lint#install
7171

72+
### Running e2e tests locally
73+
74+
See that you can run `test-e2e-local` to setup Kind and run e2e tests locally.
75+
Another option is by manually starting up Kind and configuring it and then,
76+
you can for example via your IDEA debug the e2e tests.
77+
78+
To manually setup run:
79+
80+
```shell
81+
# To generate an Kubebuilder local binary with your changes
82+
make install
83+
# To create the cluster and configure a CNI which supports NetworkPolicy
84+
kind create cluster --config ./test/e2e/kind-config.yaml
85+
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
86+
```
87+
88+
Now, you can for example, run in debug mode the `test/e2e/v4/e2e_suite_test.go`:
89+
90+
![example](https://github.com/kubernetes-sigs/kubebuilder/assets/7708031/277d26d5-c94d-41f0-8f02-1381458ef750)
91+
7292
### Test Plugin
7393

7494
If your intended PR creates a new plugin, make sure the PR also provides test cases. Testing should include:

0 commit comments

Comments
 (0)