From b1310877d8eceab8d34f21ccbc754126243c63b5 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Mon, 21 Mar 2022 09:33:26 -0700 Subject: [PATCH] Add docs for how to run specific integration test(s) to CONTRIBUTING.md --- CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1351b6b5..73f93f3c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -149,6 +149,11 @@ go build -o pinniped ./cmd/pinniped ulimit -n 512 && source /tmp/integration-test-env && go test -v -count 1 -timeout 0 ./test/integration ``` + To run specific integration tests, add the `-run` flag to the above command to specify a regexp for the test names. + Use a leading `/` on the regexp because the Pinniped integration tests are automatically nested under several parent tests + (see [integration/main_test.go](https://github.com/vmware-tanzu/pinniped/blob/main/test/integration/main_test.go)). + For example, to run an integration test called `TestE2E`, add `-run /TestE2E` to the command shown above. + 1. After making production code changes, recompile, redeploy, and run tests again by repeating the same commands described above. If there are only test code changes, then simply run the tests again.