From 26156a99c43f82543f3159add21602577965eb49 Mon Sep 17 00:00:00 2001 From: Yumeng Zhang Date: Thu, 22 Oct 2020 18:29:15 +0800 Subject: [PATCH] Add documents for conformance tests Add a section in test/README.md for conformance tests. --- test/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/README.md b/test/README.md index 2edb90b7729..e620bf67dcf 100644 --- a/test/README.md +++ b/test/README.md @@ -11,6 +11,9 @@ go test ./... # Integration tests (against your current kube cluster) go test -v -count=1 -tags=e2e -timeout=20m ./test + +#conformance tests (against your current kube cluster) +go test -v -count=1 -tags=conformance -timeout=10m ./test ``` ## Unit tests @@ -331,6 +334,29 @@ err = WaitForTaskRunState(c, hwTaskRunName, func(tr *v1alpha1.TaskRun) (bool, er _[Metrics will be emitted](https://github.com/knative/pkg/tree/master/test#emit-metrics) for these `Wait` methods tracking how long test poll for._ +## Conformance tests + +### Setup + +Environment variables used by conformance tests: + +- `KO_DOCKER_REPO` - Set this to an image registry your tests can push images to + +### Running + +Conformance tests live in this directory. These tests are used to check [API specs](../docs/api-spec.md) +of Pipelines. To run these tests, you must provide `go` with `-tags=conformance`. By default, the tests +run against your current kubeconfig context, but you can change that and other settings with the flags like +the end to end tests: + +```shell +go test -v -count=1 -tags=conformace -timeout=10m ./test +go test -v -count=1 -tags=conformace -timeout=10m ./test --kubeconfig ~/special/kubeconfig --cluster myspecialcluster +``` + +Flags that could be set in conformance tests are exactly the same as [flags in end to end tests](#flags). +Just note that the build tags should be `-tags=conformance`. + ## Presubmit tests [`presubmit-tests.sh`](./presubmit-tests.sh) is the entry point for all tests