Skip to content

Commit

Permalink
Add documents for conformance tests
Browse files Browse the repository at this point in the history
Add a section in test/README.md for conformance tests.
  • Loading branch information
yaoxiaoqi committed Oct 22, 2020
1 parent 7e376a0 commit 26156a9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 26156a9

Please sign in to comment.