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

Document the use of -count=1 flag to disable test caching #2082

Merged
merged 2 commits into from
Oct 24, 2023
Merged
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: 7 additions & 2 deletions docs/12-contribute-to-zarf/2-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ make test-e2e ARCH="[amd64|arm64]"
APPLIANCE_MODE=true make test-e2e ARCH="[amd64|arm64]"

# If you already have everything build, you can run this inside this folder. This lets you customize the test run.
go test ./src/test/... -v -failfast
go test ./src/test/... -v -failfast -count=1

# Let's say you only want to run one test. You would run:
go test ./src/test/... -v -failfast -run TestFooBarBaz
go test ./src/test/... -v -failfast -run TestFooBarBaz -count=1
```

:::note
The `-count=1` flag is the idiomatic way to disable
test caching explicitly.
:::

:::note
The Zarf binary and built packages are required to be stored in the ./build directory. However, if you intend to run tests locally using 'go test ./...', the zarf-init package must also be present in this directory.
:::
Expand Down