Conformance tests verifies knative eventing implementation for expected behavior
described in
specification.
Run test with e2e tag and optionally select conformance test
NOTE: Make sure you have built the
test images!
ko apply -Rf test/config/
export SYSTEM_NAMESPACE=knative-eventing
go test -v -tags=e2e -count=1 ./test/conformance/...
go test -v -timeout 30s -tags e2e knative.dev/eventing/test/conformance -run ^TestMustPassTracingHeaders$
go test -v -timeout 30s -tags e2e knative.dev/eventing/test/conformance -run ^TestMustPassTracingHeaders$ --kubeconfig $KUBECONFIG
When developing a new broker, or testings against a preexisting broker setup you
can specify:
go test -v -tags e2e knative.dev/eventing/test/conformance -brokername=foo -brokernamespace=bar -run TestBrokerDataPlaneIngress
It is possible to run the conformance tests by a user with reduced privileges, e.g. project admin.
Some tests require cluster-admin privileges and those tests are excluded from execution in this case.
Running the conformance tests then consists of these steps:
- The cluster admin creates test namespaces and required RBAC. Each test requires a separate namespace.
By default, the namespace names consist of
eventing-e2e
prefix and numeric suffix starting from 0:
eventing-e2e0
, eventing-e2e1
, etc. The prefix can be configured using the EVENTING_E2E_NAMESPACE env
variable. There's a helper script in the current folder that will create all the required resources:
NUM_NAMESPACES=40 ./create-namespace-rbac.sh
Note: The number of required namespaces might grow over time.
- The project admin runs the test suite with specific flags:
go test -v -tags=e2e,project_admin -count=1 ./test/conformance \
-reusenamespace \
-kubeconfig=$PROJECT_ADMIN_KUBECONFIG
The $PROJECT_ADMIN_KUBECONFIG's user is expected to be a project admin for all the
created namespaces.