Skip to content

Commit bd66200

Browse files
committed
CI: portfwd: test docker run -p 80:80
To ensure that the issue 2859 does not happen with the default port forwarder Signed-off-by: Akihiro Suda <[email protected]>
1 parent c0efefe commit bd66200

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hack/test-templates.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,11 @@ if [[ -n ${CHECKS["port-forwards"]} ]]; then
307307
fi
308308
limactl shell "$NAME" $sudo $CONTAINER_ENGINE info
309309
limactl shell "$NAME" $sudo $CONTAINER_ENGINE pull --quiet ${nginx_image}
310-
limactl shell "$NAME" $sudo $CONTAINER_ENGINE run -d --name nginx -p 8888:80 ${nginx_image}
311-
312-
timeout 3m bash -euxc "until curl -f --retry 30 --retry-connrefused http://${hostip}:8888; do sleep 3; done"
310+
for hostport in 8888 80; do
311+
limactl shell "$NAME" $sudo $CONTAINER_ENGINE run -d --name nginx -p ${hostport}:80 ${nginx_image}
312+
timeout 3m bash -euxc "until curl -f --retry 30 --retry-connrefused http://${hostip}:${hostport}; do sleep 3; done"
313+
limactl shell "$NAME" $sudo $CONTAINER_ENGINE rm -f nginx
314+
done
313315
fi
314316
fi
315317
set +x

0 commit comments

Comments
 (0)