* upgrade to latest dependencies
bumping go.uber.org/zap a55bdc3...56468e7:
> 56468e7 Release v1.25.0
> 249507a zap.Any: Reduce stack size with generics (# 1310)
> 50b2db4 zap.Any add benchmarks
> a0674c8 Add direct coverage to zap.Any (# 1309)
> 1310691 Table test TestFieldConstructors
> 382e251 Swap expected and got fields (# 1282)
> 24b7977 Add Name() to Logger (# 1273)
> 1155ed3 Introduce Str + Strs generic string helpers (# 1281)
> 4451b47 exp: Update slog, adjust for changes (# 1276)
> 845ca51 internal: Add and use a generic pool instead of using sync.Pool directly (# 1262)
> 42b7ef0 slog: Ignore frames with a zero PC (# 1258)
> 05c4b6c Remove dependency on github.com/pkg/errors (# 1255)
> d1a1923 Minimize permissions on CI workflows (# 1257)
> 384e782 Use sync/atomic, drop external atomics (# 1253)
> 740fda7 TestLevelFlag: Don't print to stderr (# 1254)
> f2f1f41 [Feature] Add experiment `zapslog` package to integrate with slog (# 1246)
> 54862f5 benchmark: add slog (# 1245)
> 85c4932 Add govulncheck as a CI step (# 1239)
> f4ba5f5 make: Switch from golint to revive (# 1238)
> 8310f89 chore: update bench package versions and results (# 1207)
> 8d89127 Bump actions/checkout from 2 to 3 (# 1237)
> bc64796 doc: New{Production,Development}Encoder{,Config} (# 1234)
> 692ec13 ci: Set up dependabot for GH actions and tools (# 1236)
> 7d6a9af ci: Test with Go 1.19 and 1.20 (# 1235)
> d4a1083 doc(SugaredLogger): Document print, printf, and println methods (# 1233)
> b32f3c5 Update Snyk vulnerable modules (# 1227)
> 53fdb6f Reverse comparison for readability (# 1228)
> 077b03e Use iota like a original from grpc-go (# 1220)
bumping knative.dev/serving e9425f8...eaff0b3:
> eaff0b3 upgrade to latest dependencies (# 14290)
> 587de3d Update net-kourier nightly (# 14286)
> 21264fc Update net-contour nightly (# 14284)
> a9b48be Deprecate calling kubetest2 via kntest (# 13329)
> 397cfde Update net-istio nightly (# 14285)
bumping knative.dev/eventing 29ac3ee...a2e2aa3:
> a2e2aa3 Eventing TLS: Test SinkBinding with Broker as sink (# 7172)
> d8a2ad5 change the deprecated string (# 7179)
> 0e88db1 Switch to trigger.WithNewFilters() to set trigger filter (# 7188)
> 9d2bcef Add kind e2e tests for Kubernetes v1.27.3 (# 7139)
> 2b02cb4 Add OIDC Authentication feature flag (# 7183)
bumping github.com/hashicorp/golang-lru 14eae34...a032ef5:
> a032ef5 Update README for v1.0.2
> bdf35e3 Remove deprecated linters
> bc1608d Update other tests to get rid of math/rand
> f2408b3 Update test to remove bad rand usage
> fa11c6b Update github workflow
> 6da3f98 Update MPL 2.0 LICENSE (# 110)
> d4900dc fix onEvictedCB bug (# 84)
> 003b81b Update go doc url (# 93)
> 80c9821 rework lru's external registered callback invocation to avoid concurr… (# 80)
> eb52994 Code quality improvements (# 67)
bumping go.uber.org/multierr 10aaa3c...8767aa9:
> 8767aa9 Prepare release v1.10 (# 74)
> 4504ef7 README: Add Features section (# 73)
> 2fd451d Drop external atomic dependency (# 72)
> 7876a02 Remove unused glide.yaml (# 71)
> 55bc553 Support Go 1.20 Unwrap() []error (# 69)
> 39ca40c Prepare release v1.9.0 (# 68)
> 4459990 Add a shorthand for AppendInvoke (# 65)
> 80b07a7 Document named return constraint for defer (# 63)
> 492b792 Test and lint against Go 1.19 (# 62)
>
|
||
|---|---|---|
| .. | ||
| e2e | ||
| resources/tekton | ||
| test_images | ||
| README.md | ||
| common.sh | ||
| e2e-tests.sh | ||
| local-e2e-tests.sh | ||
| presubmit-integration-tests-latest-release.sh | ||
| presubmit-tests.sh | ||
| tekton-tests.sh | ||
| upload-test-images.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 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:
- 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
Running E2E tests as a project admin
It is possible to run the E2E 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 E2E tests then consists of these steps:
- The cluster admin creates test namespaces. Each test requires a separate namespace.
By default, the namespace names consist of
kne2etestsprefix and numeric suffix starting from 0:kne2etests0,kne2etests1, etc. The prefix can be configured using the KN_E2E_NAMESPACE env variable. The namespace can be created as follows:
Note: There are currently slightly over 30 tests but the number will grow so the number of created namespaces need to be adjusted.for i in $(seq 0 40); do kubectl create ns "${KN_E2E_NAMESPACE}${i}"; done - The project admin runs the test suite with specific flags:
It is expected that the current user is a project admin for all test namespaces and their KUBECONFIG is located atE2E_TAGS="project_admin" test/local-e2e-tests.sh --reusenamespace$HOME/.kube/configor the env variable$KUBECONFIGpoints to it.
E2E tests prow jobs
Two e2e tests prow jobs are run in CI:
- pull-knative-client-integration-tests: Runs client e2e tests with the nightly build of serving and eventing.
- 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.