Skip to content

Commit e077f2d

Browse files
committed
refactor: update test script to check env var
1 parent 9e3c8bd commit e077f2d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

ci/dev/test.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,18 @@ main() {
1010
# include our source files.
1111
cd "$OLDPWD"
1212
# We use the same environment variables set in ci.yml in the test job
13-
CS_DISABLE_PLUGINS=true PASSWORD=e45432jklfdsab CODE_SERVER_ADDRESS=http://localhost:8080 ./test/node_modules/.bin/jest "$@"
13+
if [[ -z ${PASSWORD+x} ]] || [[ -z ${CODE_SERVER_ADDRESS+x} ]]; then
14+
echo "The end-to-end testing suites rely on your local environment"
15+
echo -e "\n"
16+
echo "Please set the following environment variables locally:"
17+
echo " \$PASSWORD"
18+
echo " \$CODE_SERVER_ADDRESS"
19+
echo -e "\n"
20+
echo "Please make sure you have code-server running locally."
21+
echo -e "\n"
22+
exit 1
23+
fi
24+
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@"
1425
}
1526

1627
main "$@"

0 commit comments

Comments
 (0)