The standard set of Serving conformance tests is currently under this directory.
-
Check out your Knative Serving fork
Create your own fork of the Knative Serving repository. Clone it to your machine:
git clone [email protected]:<YOUR_GITHUB_USERNAME>/serving.git cd serving
-
Build and upload the test images
Set the environment variable for the docker repository to which test images should be pushed (e.g. gcr.io/[gcloud-project]). Then build and upload the test images
export KO_DOCKER_REPO=<YOUR_DOCKER_REPOSITORY> ./test/upload-test-images.sh
-
Configure client objects
By default the tests will use the kubeconfig file at
~/.kube/config
to create client objects connecting to your Knative platform. If~/.kube/config
is not the one you intend to use, create your own config file.You might need to take other actions to grant authorization for the client objects to access your Knative platform.
Please see examples section for details.
-
Run the tests
Run conformance tests for API v1:
go test -v -tags=e2e -count=1 ./test/conformance/api/v1 \ -kubeconfig <YOUR_CONFIG_FILE> -disable-logstream=true -disable-optional-api=true
Run conformance tests for runtime:
go test -v -tags=e2e -count=1 ./test/conformance/runtime \ -kubeconfig <YOUR_CONFIG_FILE> -disable-logstream=true -disable-optional-api=true
You might need to specify extra test flags.
Examples are under this directory.