mirror of https://github.com/knative/client.git
* feat(source): Add 'kn source list' Fixes #480 - Add 'kn source list' listing the available sources COs - Use dynamic client to - find out available source types - find the COs in given namespace for each source type - Add --type flag to filter source list based on source type - Add unit tests - Add e2e tests - Add CHANGELOG entry * Update group for ApiServerSource in tests * Add kn duck source type for holding common eventing source fileds - Common infromation from sources are extracted into a struct for source list command output - Printer function picks the information from this struct object and doesn't know the details about extracting this info from multiple types of sources received - Group and Version for list is set to empty string and Kind to 'List', if printed a source list with multiple types of sources in machine readable format - Group, Version and Kind for list are kept intact if printed a source list with same type of source objects in machine readable format * Update go.sum * Add WithType builder for listing source - Separate the flags definition - WithType builder can be re-used to filter the source types - Add unit tests * Update ApiServer source group to apiserversources.sources.knative.dev * Fix typos and align Co-authored-by: Roland Huß <roland@ro14nd.de> |
||
|---|---|---|
| .. | ||
| e2e | ||
| resources/tekton | ||
| test_images/helloworld | ||
| README.md | ||
| common.sh | ||
| e2e-tests.sh | ||
| local-e2e-tests.sh | ||
| presubmit-integration-tests-latest-release.sh | ||
| presubmit-tests.sh | ||
| tekton-tests.sh | ||
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
- Running knative environment.
knbinary in the $PATH.- 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