Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e4c4b21

Browse files
committed
build(travis): gracefully shut down the sauce connect tunnel after the tests are done running
This is to prevent sauce connect tunnel leaks.
1 parent 240d589 commit e4c4b21

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ script:
6161
- ./scripts/travis/build.sh
6262

6363
after_script:
64+
- ./scripts/travis/tear_down_browser_provider.sh
6465
- ./scripts/travis/print_logs.sh
6566

6667
notifications:

lib/browserstack/teardown_tunnel.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -e -o pipefail
4+
5+
6+
echo "Shutting down Browserstack tunnel"
7+
echo "TODO: implement me"
8+
exit 1

lib/saucelabs/teardown_tunnel.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e -o pipefail
4+
5+
6+
echo "Shutting down Sauce Connect tunnel"
7+
killall sc
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
# Has to be run from project root directory.
3+
4+
./lib/${BROWSER_PROVIDER}/teardown_tunnel.sh

0 commit comments

Comments
 (0)