row 305 (#1812): each suite's network check also requires the network present under the run's project before the remove (mos-1445)
This commit is contained in:
1 parent
541dee2b75
commit
3bce852d5d
2 files changed
+18
-10
No files matched your search
@@ -123,12 +123,16 @@ else
|
||||
echo "skip state-machine cases (docker daemon unavailable)"
|
||||
fi
|
||||
|
||||
# The compose network goes with the run (row 305): the trap's cleanup leaves no
|
||||
# network under this run's project name.
|
||||
# The compose network goes with the run (row 305). Present before the remove
|
||||
# proves compose used this run's project name; absent after proves the trap's
|
||||
# cleanup removes it (mos-1445).
|
||||
if docker info >/dev/null 2>&1; then
|
||||
remove_compose_network
|
||||
NETS="$(docker network ls -q --filter "name=^${COMPOSE_PROJECT_NAME}_default\$")" && [ -z "$NETS" ] \
|
||||
&& check "compose network removed after the run" 0 || check "compose network removed after the run" 1
|
||||
NET="${COMPOSE_PROJECT_NAME}_default"
|
||||
BEFORE="$(docker network ls -q --filter "name=^${NET}\$")" && [ -n "$BEFORE" ] \
|
||||
&& remove_compose_network \
|
||||
&& AFTER="$(docker network ls -q --filter "name=^${NET}\$")" && [ -z "$AFTER" ] \
|
||||
&& check "compose network made under the run's project and removed after the run" 0 \
|
||||
|| check "compose network made under the run's project and removed after the run" 1
|
||||
else
|
||||
echo "skip compose network check (docker daemon unavailable)"
|
||||
fi
|
||||
|
||||
@@ -573,12 +573,16 @@ fi
|
||||
git -C "$SANDBOX/repo" rev-parse >/dev/null 2>&1 || true
|
||||
unset MOSAIC_CONFIG
|
||||
|
||||
# The compose network goes with the run (row 305): the trap's cleanup leaves no
|
||||
# network under this run's project name.
|
||||
# The compose network goes with the run (row 305). Present before the remove
|
||||
# proves compose used this run's project name; absent after proves the trap's
|
||||
# cleanup removes it (mos-1445).
|
||||
if docker info >/dev/null 2>&1; then
|
||||
remove_compose_network
|
||||
NETS="$(docker network ls -q --filter "name=^${COMPOSE_PROJECT_NAME}_default\$")" && [ -z "$NETS" ] \
|
||||
&& check "compose network removed after the run" 0 || check "compose network removed after the run" 1
|
||||
NET="${COMPOSE_PROJECT_NAME}_default"
|
||||
BEFORE="$(docker network ls -q --filter "name=^${NET}\$")" && [ -n "$BEFORE" ] \
|
||||
&& remove_compose_network \
|
||||
&& AFTER="$(docker network ls -q --filter "name=^${NET}\$")" && [ -z "$AFTER" ] \
|
||||
&& check "compose network made under the run's project and removed after the run" 0 \
|
||||
|| check "compose network made under the run's project and removed after the run" 1
|
||||
else
|
||||
echo "skip compose network check (docker daemon unavailable)"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user