diff --git a/test/README.md b/test/README.md index 271aadde1..43b443079 100644 --- a/test/README.md +++ b/test/README.md @@ -31,7 +31,7 @@ the name starting with `kne2etests` Run all e2e tests: ```bash -$ test/e2e-tests-local.sh +$ test/local-e2e-tests.sh ``` ### Running e2e tests selectively @@ -39,13 +39,13 @@ $ test/e2e-tests-local.sh To run only serving specific e2e tests locally, use ```bash -E2E_TAGS="serving" test/e2e-tests-local.sh +E2E_TAGS="serving" test/local-e2e-tests.sh ``` To run only eventing specific e2e tests locally, use ```bash -E2E_TAGS="eventing" test/e2e-tests-local.sh +E2E_TAGS="eventing" test/local-e2e-tests.sh ``` ### Running a single test case @@ -53,7 +53,7 @@ E2E_TAGS="eventing" test/e2e-tests-local.sh To run one e2e test case, e.g. TestBasicWorkflow ```bash -test/e2e-tests-local.sh -run ^TestBasicWorkflow$ +test/local-e2e-tests.sh -run ^TestBasicWorkflow$ ``` ### Running tests in short mode @@ -64,5 +64,5 @@ mode, use [the `-short` flag with `go test`](https://golang.org/cmd/go/#hdr-Testing_flags) ```bash -test/e2e-tests-local.sh -short +test/local-e2e-tests.sh -short ``` diff --git a/test/local-e2e-tests.sh b/test/local-e2e-tests.sh new file mode 100644 index 000000000..a52f094a3 --- /dev/null +++ b/test/local-e2e-tests.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +export PATH=$PWD:$PATH + +dir=$(dirname "${BASH_SOURCE[0]}") +base=$(cd "$dir/.." && pwd) + +# Will create and delete this namespace (used for all tests, modify if you want a different one used) +export KN_E2E_NAMESPACE=kne2etests + +echo "🧪 Testing" +go test ${base}/test/e2e/ -test.v -tags "e2e ${E2E_TAGS}" "$@"