From f88cccdf7716be2443477ceee51ee5baa2761f56 Mon Sep 17 00:00:00 2001 From: Lucas Rodriguez Date: Tue, 24 Oct 2023 13:15:38 -0500 Subject: [PATCH] Document the use of -count=1 flag to disable test caching (#2082) ## Description Document the use of -count=1 flag to disable test caching ## Related Issue N/A ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed Co-authored-by: Wayne Starr --- docs/12-contribute-to-zarf/2-testing.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/12-contribute-to-zarf/2-testing.md b/docs/12-contribute-to-zarf/2-testing.md index 024fd6acda..e36f8a9b47 100644 --- a/docs/12-contribute-to-zarf/2-testing.md +++ b/docs/12-contribute-to-zarf/2-testing.md @@ -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. :::