File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1717# Proof of concept: setting up proxy
1818
1919PROXY_VERSION=" v2.15.1"
20- SETUP_STYLE=${1:- tcp}
20+
21+ while getopts c: flag
22+ do
23+ case " ${flag} " in
24+ c) SETUP_STYLE=${1:- tcp} ;;
25+ esac
26+ done
2127
2228if [[ ! $SETUP_STYLE == " tcp" ]]; then
2329 echo " setup for sockets"
@@ -45,8 +51,12 @@ sleep 10
4551echo " Proxy ready for use"
4652
4753# Run test
48- $@
54+ $@ || STATUS=$?
55+
4956
5057echo " Shutting down proxy process"
5158
5259pkill -f " cloud-sql-proxy" || echo " cloud-sql-proxy process not found. Was it already stopped?"
60+
61+ # Fail if the tests failed
62+ exit $STATUS
Original file line number Diff line number Diff line change 1515 "start" : " node server/server.js" ,
1616 "proxy" : " bash $GITHUB_WORKSPACE/.github/workflows/utils/sql-proxy.sh" ,
1717 "system-test" : " npm run proxy -- c8 mocha -p -j 2 test/server.test.js --timeout=60000 --exit" ,
18- "system-test-unix" : " npm run proxy -- c8 mocha -p -j 2 test/server-unix.test.js --timeout=60000 --exit" ,
18+ "system-test-unix" : " npm run proxy -c socket - - c8 mocha -p -j 2 test/server-unix.test.js --timeout=60000 --exit" ,
1919 "test" : " npm run system-test && npm run system-test-unix"
2020 },
2121 "dependencies" : {
You can’t perform that action at this time.
0 commit comments