@@ -19,6 +19,14 @@ unset REGISTRY_AUTH_FILE
19
19
function start_registry() {
20
20
if [[ -d " $PODMAN_LOGIN_WORKDIR /auth" ]]; then
21
21
# Already started
22
+
23
+ # Fixes very obscure corner case in root system tests:
24
+ # 1) we run 150-login tests, starting a registry; then
25
+ # 2) run 500-network, which runs iptables -F; then
26
+ # 3) run 700-play, the "private" test, which needs the
27
+ # already-started registry, but its port is now DROPped,
28
+ # so the test times out trying to talk to registry
29
+ run_podman --storage-driver vfs $( podman_isolation_opts ${PODMAN_LOGIN_WORKDIR} ) network reload --all
22
30
return
23
31
fi
24
32
@@ -28,10 +36,8 @@ function start_registry() {
28
36
# Registry image; copy of docker.io, but on our own registry
29
37
local REGISTRY_IMAGE=" $PODMAN_TEST_IMAGE_REGISTRY /$PODMAN_TEST_IMAGE_USER /registry:2.8"
30
38
31
- # Pull registry image, but into a separate container storage
32
- mkdir ${PODMAN_LOGIN_WORKDIR} /root
33
- mkdir ${PODMAN_LOGIN_WORKDIR} /runroot
34
- PODMAN_LOGIN_ARGS=" --storage-driver vfs --root ${PODMAN_LOGIN_WORKDIR} /root --runroot ${PODMAN_LOGIN_WORKDIR} /runroot"
39
+ # Pull registry image, but into a separate container storage and DB and everything
40
+ PODMAN_LOGIN_ARGS=" --storage-driver vfs $( podman_isolation_opts ${PODMAN_LOGIN_WORKDIR} ) "
35
41
# _prefetch() will retry twice on network error, and will also use
36
42
# a pre-cached image if present (helpful on dev workstation, not in CI).
37
43
_PODMAN_TEST_OPTS=" ${PODMAN_LOGIN_ARGS} " _prefetch $REGISTRY_IMAGE
@@ -86,14 +92,9 @@ function stop_registry() {
86
92
skip " [leaving registry running by request]"
87
93
fi
88
94
89
- run_podman --storage-driver vfs \
90
- --root ${PODMAN_LOGIN_WORKDIR} /root \
91
- --runroot ${PODMAN_LOGIN_WORKDIR} /runroot \
92
- rm -f -t0 registry
93
- run_podman --storage-driver vfs \
94
- --root ${PODMAN_LOGIN_WORKDIR} /root \
95
- --runroot ${PODMAN_LOGIN_WORKDIR} /runroot \
96
- rmi -a -f
95
+ opts=" --storage-driver vfs $( podman_isolation_opts ${PODMAN_LOGIN_WORKDIR} ) "
96
+ run_podman $opts rm -f -t0 registry
97
+ run_podman $opts rmi -a -f
97
98
98
99
# By default, clean up
99
100
if [ -z " ${PODMAN_TEST_KEEP_LOGIN_WORKDIR} " ]; then
0 commit comments