fix(e2e): Restore local e2e test script (#708)

* fix(e2e): Restore local e2e test script

* Rename script to local-e2e-tests.sh and update test README
This commit is contained in:
Navid Shaikh 2020-03-09 23:16:32 +05:30 committed by GitHub
parent 21ce981963
commit 158c8f8980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 5 deletions

View File

@ -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
```

26
test/local-e2e-tests.sh Normal file
View File

@ -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}" "$@"