Use the repository test script for local validation. Run commands from the repository root.
scripts/test-local.shThis command performs these checks:
- It builds all Go packages.
- It runs
go veton all Go packages. - It checks Go formatting.
- It runs short tests outside
v1/test/integration. - It checks for conflict markers and unsafe debug output.
Use PKG to run one package pattern:
PKG=./internal/config/... scripts/test-local.shThe build, vet, formatting, and hygiene checks still apply to the complete Go module.
scripts/test-local.sh --integrationThis mode runs all packages with the integration build tag. It does not use
the -short option. It uses a 60-minute package timeout. A container runtime
must be available.
MANIFEST_DIR=/path/to/rendered/yaml scripts/test-local.sh --kindThis mode runs the fast checks. It then creates a temporary kind cluster and
applies the YAML files from MANIFEST_DIR. Install Go, Docker, kind, and
kubectl before you use this mode.
Use --keep to keep the cluster after the test:
scripts/test-local.sh --kind --keepGo tests that write user files must use t.TempDir() or t.Setenv(). Do not
set one shared configuration directory for the complete test suite. Some tests
must control that directory independently.
For the complete option reference, see the local test script.