Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update e2e examples for running a single test #236

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TEST_DEPLOY=$(TEST_SETUP_DIR)/deploy_rbac.yaml

# Pass extra flags to the e2e test run.
# e.g. to run a specific test in the e2e test suite, do:
# make e2e E2E_GO_TEST_FLAGS="-v -run TestE2E/TestScanWithNodeSelectorFiltersCorrectly"
# make e2e E2E_GO_TEST_FLAGS="-v -run TestE2E/Parallel_tests/TestScanWithNodeSelectorFiltersCorrectly"
E2E_GO_TEST_FLAGS?=-v -test.timeout 120m

# By default we run all tests; available options: all, parallel, serial
Expand Down
14 changes: 14 additions & 0 deletions doc/contributor.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ images.
$ make e2e
```

You can run a single functional tests using the `E2E_GO_TEST_FLAGS`, but it
must contain the fully rendered test name, which you may have to build manually.

```console
$ E2E_GO_TEST_FLAGS="-v -run TestE2E/Parallel_tests/TestScanWithNodeSelectorFiltersCorrectly" make e2e
```

The first part of the test name is actually the test suite (`TestE2E`), which
is responsible for setting up and tearing down resources for all tests. The
second portion of the test name is either `Parallel_tests` or `Serial_tests`,
depending on the `IsParallel` attribute of the test. The final part of the test
name is the actual test name. Note that using `-run
TestScanWithNodeSelectorFiltersCorrectly` will not match when go invokes the tests.

## Writing Release Notes

Release notes are maintained in the [changelog](CHANGELOG.md) and follow
Expand Down