Skip to content

Commit 4863a7c

Browse files
committed
Make test runnable directly
1 parent 1284b87 commit 4863a7c

File tree

1 file changed

+6
-3
lines changed
  • src/shadowbox/integration_test

1 file changed

+6
-3
lines changed

src/shadowbox/integration_test/test.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function setup() {
9494
podman network create -d bridge --internal "${NET_BLOCKED}"
9595

9696
# Target service.
97-
podman build --force-rm -t "${TARGET_IMAGE}" ./target
97+
podman build --force-rm -t "${TARGET_IMAGE}" $(dirname $0)/target
9898
podman run -d --rm -p "10080:80" --network="${NET_OPEN}" --network-alias="target" --name="${TARGET_CONTAINER}" "${TARGET_IMAGE}"
9999

100100
# Shadowsocks service.
@@ -120,9 +120,12 @@ function setup() {
120120
podman network connect "${NET_OPEN}" "${SHADOWBOX_CONTAINER}"
121121

122122
# Client service.
123-
podman build --force-rm -t "${CLIENT_IMAGE}" ./client
123+
podman build --force-rm -t "${CLIENT_IMAGE}" $(dirname $0)/client
124124
# Use -i to keep the container running.
125125
podman run -d --rm -it -p "30555:555" --network "${NET_BLOCKED}" --name "${CLIENT_CONTAINER}" "${CLIENT_IMAGE}"
126+
127+
# Utilities
128+
podman build --force-rm -t "${UTIL_IMAGE}" $(dirname $0)/util
126129
}
127130

128131
function shutdown_containers() {
@@ -151,7 +154,7 @@ function cleanup() {
151154
trap "cleanup" EXIT
152155

153156
# Make the certificate
154-
source ../scripts/make_test_certificate.sh /tmp
157+
source $(dirname $0)/../scripts/make_test_certificate.sh /tmp
155158

156159
# Sets everything up
157160
export SB_API_PREFIX='TestApiPrefix'

0 commit comments

Comments
 (0)