Skip to content

Commit

Permalink
Add env_var params
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Jun 21, 2024
1 parent affafd3 commit 9df251e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions integtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ fi

if [ "$SECURITY_ENABLED" = "true" ]
then
cmd="yarn cypress:run-with-security $ENV_VAR --browser \"$BROWSER_PATH\" --spec \"$TEST_FILES\""
cmd="yarn cypress:run --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,AGGREGATION_VIEW=true,WAIT_FOR_LOADER_BUFFER_MS=3000,$ENV_VAR --browser \"$BROWSER_PATH\" --spec \"$TEST_FILES\""
echo "run security enabled tests: $cmd"
eval $cmd
else
cmd="$ENV_VAR yarn cypress:run-without-security $ENV_VAR --browser \"$BROWSER_PATH\" --spec \"$TEST_FILES\""
cmd="$ENV_VAR yarn cypress:run --env SECURITY_ENABLED=false,$ENV_VAR --browser \"$BROWSER_PATH\" --spec \"$TEST_FILES\""
echo "run security disabled tests: $cmd"
eval $cmd
fi
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"cypress:open": "cypress open",
"cypress:run-without-security": "f() { env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=false\"$1\"; }; f",
"cypress:run-with-security": "f() { env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=3000\"$1\"; }; f",
"cypress:run": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless",
"cypress:run-without-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=false",
"cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=3000",
"cypress:run-with-security-and-aggregation-view": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,AGGREGATION_VIEW=true,WAIT_FOR_LOADER_BUFFER_MS=3000",
"cypress:run-plugin-tests-without-security": "yarn cypress:run-without-security --spec 'cypress/integration/plugins/*/*.js'",
"cypress:run-plugin-tests-with-security": "yarn cypress:run-with-security --spec 'cypress/integration/plugins/*/*.js'",
Expand Down

0 comments on commit 9df251e

Please sign in to comment.