Skip to content

Commit 0000e57

Browse files
committedMar 24, 2024·
set -euo pipefail
1 parent d0971fa commit 0000e57

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed
 

‎test-browser.sh

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Run tests against a local browser on OSX.
44

5+
set -euo pipefail
6+
57
PORT=8000
68
DOWNLOADS=~/Downloads
79
PIDFILE=/tmp/http-cache-test-server.pid

‎test-docker.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Run tests against a local docker image with common proxy/caches.
44

5+
set -euo pipefail
6+
57
PIDFILE=/tmp/http-cache-test-server.pid
68

79
ALL_PROXIES=(squid nginx apache trafficserver varnish caddy nuster)
@@ -18,13 +20,11 @@ function usage {
1820
}
1921

2022
function run {
21-
TEST_ID="$1"
23+
TEST_ID="${1}"
2224
shift
2325
PROXIES=( "$@" )
2426
# start test server
25-
npm run --silent server --port=8000 --pidfile=$PIDFILE &
26-
27-
echo $DOCKER_PORTS
27+
npm run --silent server --port=8000 --pidfile=${PIDFILE} &
2828

2929
# run proxies container
3030
docker run --platform linux/amd64 --name=tmp_proxies ${DOCKER_PORTS} -dt mnot/proxy-cache-tests host.docker.internal \
@@ -54,8 +54,8 @@ function cleanup {
5454
docker rm tmp_nuster > /dev/null
5555

5656
# stop test server
57-
kill "$(cat $PIDFILE)" > /dev/null 2>&1
58-
rm $PIDFILE
57+
kill "$(cat ${PIDFILE})" > /dev/null 2>&1
58+
rm ${PIDFILE}
5959
}
6060

6161
function test_proxy {

‎test-host.sh

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Run tests against a host/port combination.
44

5+
set -euo pipefail
6+
57
function usage {
68
if [[ -n "${1}" ]]; then
79
echo "${1}"

0 commit comments

Comments
 (0)