client/test
Martin Gencur adb6bdff74
Fully qualified test images (#1307)
* Use fully qualified image references in helloworld Dockerfile

* TMP: Run tekton tests in pre-submit

* remove this when the tekton tests pass

* TMP: Use mgencurs fork so that buildah uses the updated Dockerfile

* TMP: Fix running in pre-submit

* Revert "TMP: Fix running in pre-submit"

This reverts commit 35694f067e.

* Revert "TMP: Use mgencurs fork so that buildah uses the updated Dockerfile"

This reverts commit b7ad15e4d8.

* Revert "TMP: Run tekton tests in pre-submit"

This reverts commit 36d3a95c1b.
2021-05-10 05:40:00 -07:00
..
e2e Fix service/revision list output with '-o' param (#1276) 2021-04-13 07:53:00 -07:00
resources/tekton Pass revision to git-clone Tekton task - fix nightly Tekton tests (#1270) 2021-03-19 07:39:53 -07:00
test_images Fully qualified test images (#1307) 2021-05-10 05:40:00 -07:00
README.md Drop master references to knative repos (#1254) 2021-03-09 03:42:25 -08:00
common.sh Add DomainMapping CRUD commands (#1267) 2021-04-01 08:53:23 -07:00
e2e-tests.sh add support for namespace for all commands that takes --sink option (#1264) 2021-03-18 06:41:54 -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 Update Eventing Sources API to v1 (#1299) 2021-05-03 03:12:58 -07:00
presubmit-tests.sh updating to use the hack repo (#1084) 2020-10-30 11:41:35 -07:00
tekton-tests.sh fix(tekton e2e): Fix CONTAINER_REGISTRY name generation (#1074) 2020-10-26 08:38:41 -07:00
upload-test-images.sh Allow to specify build platform for test images (#1210) 2021-02-02 06:36:33 -08: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 locally:

$ hack/build.sh -t

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

Running E2E tests

To run the e2e tests locally, you need to have:

  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

E2E tests prow jobs

Two e2e tests prow jobs are run in CI:

  1. pull-knative-client-integration-tests: Runs client e2e tests with the nightly build of serving and eventing.
  2. pull-knative-client-integration-tests-latest-release: Runs client e2e tests with the latest release of serving and eventing. The latest release version can be configured here.

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:

PLATFORM environment variable is optional. If it is specified, test images will be built for specific hardware architecture, according to its value (for instance,linux/arm64).

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.