This directory contains tests and testing docs for
- Unit tests currently reside in the codebase alongside the code they test
- End-to-end tests, of which there are two types:
Running unit tests
To run all unit tests:
go test ./...
Running end to end tests
Setting up a running
Knative Build cluster.
A Kubernetes cluster v1.10 or newer with the
MutatingAdmissionWebhookadmission controller enabled.
kubectlv1.10 is also required. see here
koto point to your registry. see here
Go e2e tests
Finally run the Go e2e tests with the build tag
go test -v -tags=e2e -count=1 ./test/e2e/...
-count=1 is the idiomatic way to bypass test caching, so that tests will
YAML e2e tests
To run the YAML e2e tests, you need to have a running environment that meets the e2e test environment requirements.
One test case
To run one e2e test case, e.g. TestSimpleBuild, use
-run flag with
go test -v -tags=e2e -count=1 ./test/e2e/... -run=<regex>