-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor how we determine TEST_LIGHTSPEED_URL
- Loading branch information
Showing
3 changed files
with
7 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# If TEST_LIGHTSPEED_URL is not defined, set a URL with the ipv6 callback hostname, | ||
# which is available in the GitHub Actions Linux environment. | ||
if [[ -z "${TEST_LIGHTSPEED_URL}" ]]; then | ||
TEST_LIGHTSPEED_URL="http://ip6-localhost:3000" | ||
fi | ||
|
||
# Create log dir for express.log | ||
if [ ! -d out/log ]; then | ||
mkdir out/log | ||
fi | ||
|
||
# Start the mock Lightspeed server and run e2e tests with code coverage enabled. | ||
npx start-server-and-test \ | ||
"TEST_LIGHTSPEED_URL=${TEST_LIGHTSPEED_URL} yarn mock-lightspeed-server" \ | ||
"yarn mock-lightspeed-server" \ | ||
"${TEST_LIGHTSPEED_URL}" \ | ||
"TEST_LIGHTSPEED_ACCESS_TOKEN=dummy TEST_LIGHTSPEED_URL=${TEST_LIGHTSPEED_URL} yarn coverage-e2e" | ||
"TEST_LIGHTSPEED_ACCESS_TOKEN=dummy yarn coverage-e2e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters