client/test
Zhimin Xiang 9b210e3be1
[Release-0.18] Pin knative deps to release-0.18 (#1025)
* Pin pkg to release-0.18 version

* ./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh

* bump k8s version to 1.18.8

* Fix the brokerage of importing latest serving

* exclude script/test-infra md from md check
2020-09-23 11:58:41 -07:00
..
e2e [Release-0.18] Pin knative deps to release-0.18 (#1025) 2020-09-23 11:58:41 -07:00
resources/tekton Update Tekton resources to v1beta1 (#861) 2020-05-27 06:31:59 -07:00
test_images Remove -mod=readonly from the helloworld's Dockerfile (#1017) 2020-09-17 16:03:44 -07:00
README.md build test images for e2e (#974) 2020-08-20 04:42:13 -07:00
common.sh build test images for e2e (#974) 2020-08-20 04:42:13 -07:00
e2e-tests.sh build test images for e2e (#974) 2020-08-20 04:42:13 -07:00
local-e2e-tests.sh Use vendored deps while running e2e locally (#783) 2020-04-07 16:26:08 -07:00
presubmit-integration-tests-latest-release.sh Vendor serving and eventing at v0.17.0 (#984) 2020-08-20 03:22:13 -07:00
presubmit-tests.sh kn v0.16.0 release prep (#922) 2020-07-10 10:41:19 -07:00
tekton-tests.sh Update Tekton resources to v1beta1 (#861) 2020-05-27 06:31:59 -07:00
upload-test-images.sh add e2e for h2c (#1000) 2020-09-11 03:32:00 -07:00

README.md

Test

This directory contains e2e tests and testing docs:

  • Unit tests are in the code base alongside the code they test
  • e2e tests are in test/e2e/

Running unit tests

To run all unit tests:

$ hack/build.sh -t

By default go test will not run the e2e tests, which need -tags=e2e to be enabled.

Running e2e tests locally

To run the e2e tests , you need to have a

  1. Running knative environment.
  2. kn binary in the $PATH.
  3. Please Make sure that you are able to connect to the cluster by following the guide here

Before running the e2e tests please make sure you dont have any namespaces with the name starting with kne2etests

Run all e2e tests:

$ test/local-e2e-tests.sh

Running e2e tests selectively

To run only serving specific e2e tests locally, use

E2E_TAGS="serving" test/local-e2e-tests.sh

To run only eventing specific e2e tests locally, use

E2E_TAGS="eventing" test/local-e2e-tests.sh

Running a single test case

To run one e2e test case, e.g. TestBasicWorkflow

test/local-e2e-tests.sh -run ^TestBasicWorkflow$

Running tests in short mode

Running tests in short mode excludes some large-scale E2E tests and saves time/resources required for running the test suite. To run the tests in short mode, use the -short flag with go test

test/local-e2e-tests.sh -short

Test images

Building the test images

The upload-test-images.sh script can be used to build and push the test images used by the e2e tests. The script expects your environment to be setup as described in DEVELOPMENT.md.

To run the script for all end to end test images:

./test/upload-test-images.sh

A docker tag may be passed as an optional parameter. This can be useful on Minikube in tandem with the --tag flag:

eval $(minikube docker-env)
./test/upload-test-images.sh any-old-tag

Adding new test images

New test images should be placed in ./test/test_images.