fix bug where *_test.sh doesn't source snips.sh (#7545)

* fix bug where *_test.sh doesn't source snips.sh

* remove 'source snips.sh' from scripts
This commit is contained in:
Hongyi Zhang 2020-06-12 18:12:53 +00:00 committed by GitHub
parent 3f6e0312cf
commit a4f252ff2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -21,8 +21,6 @@ set -e
set -u
set -o pipefail
source "${REPO_ROOT}/content/en/docs/tasks/traffic-management/egress/egress-gateway-tls-origination/snips.sh"
# Generate Certificates for service outside the mesh to use for mTLS
snip_generate_client_and_server_certificates_and_keys_1
snip_generate_client_and_server_certificates_and_keys_2

View File

@ -21,8 +21,6 @@ set -e
set -u
set -o pipefail
source "${REPO_ROOT}/content/en/docs/tasks/traffic-management/egress/egress-gateway-tls-origination/snips.sh"
# Deploy sleep sample and set up variable pointing to it
set +e
kubectl delete pods -l app=sleep --force

View File

@ -222,7 +222,9 @@ func split(testsAsString string) []string {
// snippets and some test utilities. It receives `testPath`, which is the
// path of the test script file to be run.
func getHelperScript(testPath string) string {
snipsPath := strings.ReplaceAll(testPath, testFileSuffix, snipsFileSuffix)
splitPath := strings.Split(testPath, "/")
splitPath[len(splitPath)-1] = snipsFileSuffix
snipsPath := strings.Join(splitPath, "/")
return fmt.Sprintf(helperTemplate, defaultPath, snipsPath)
}