Skip to content

Commit

Permalink
debug test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
thockin committed Jun 13, 2024
1 parent d61932f commit eaa4414
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ function docker_run() {
-d \
${RM} \
--label git-sync-e2e="$RUNID" \
--network "e2e_$RUNID" \
"$@"
sleep 2 # wait for it to come up
}
Expand All @@ -158,7 +159,8 @@ function docker_ip() {
echo "usage: $0 <id>"
return 1
fi
docker inspect "$1" | jq -r .[0].NetworkSettings.IPAddress
docker inspect "$1" \
| jq -r ".[0].NetworkSettings.Networks.e2e_$RUNID.IPAddress"
}

function docker_kill() {
Expand Down Expand Up @@ -285,7 +287,7 @@ function GIT_SYNC() {
-i \
${RM} \
--label git-sync-e2e="$RUNID" \
--network="host" \
--network "e2e_$RUNID" \
-u git-sync:$(id -g) `# rely on GID, triggering "dubious ownership"` \
-v "$ROOT":"$ROOT":rw \
-v "$REPO":"$REPO":ro \
Expand Down Expand Up @@ -315,6 +317,7 @@ function remove_containers() {
| while read CTR; do
docker kill "$CTR" >/dev/null
done
docker network prune -f >/dev/null
}

#
Expand Down Expand Up @@ -3513,6 +3516,7 @@ function run_test() {
set -o errexit
set -o nounset
set -o pipefail
docker network create "e2e_$RUNID" --subnet "192.168.0.0/24"
"$@"
)
eval "$retvar=$?"
Expand Down

0 comments on commit eaa4414

Please sign in to comment.