Skip to content

Commit 87d334b

Browse files
committed
CI: test UDP port forwarding
Partially fix issue 3657 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent 70a3f13 commit 87d334b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

hack/test-templates.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,10 @@ if [[ -n ${CHECKS["ssh-over-vsock"]} ]]; then
375375
fi
376376
fi
377377

378-
# Use GHCR to avoid hitting Docker Hub rate limit
378+
# Use GHCR and ECR to avoid hitting Docker Hub rate limit
379379
nginx_image="ghcr.io/stargz-containers/nginx:1.19-alpine-org"
380380
alpine_image="ghcr.io/containerd/alpine:3.14.0"
381+
coredns_image="public.ecr.aws/eks-distro/coredns/coredns:v1.12.2-eks-1-31-latest"
381382

382383
if [[ -n ${CHECKS["container-engine"]} ]]; then
383384
sudo=""
@@ -398,6 +399,16 @@ if [[ -n ${CHECKS["container-engine"]} ]]; then
398399
timeout 3m bash -euxc "until curl -f --retry 30 --retry-connrefused http://127.0.0.1:8080; do sleep 3; done"
399400

400401
limactl shell "$NAME" $sudo $CONTAINER_ENGINE rm -f nginx
402+
403+
if [ "${OS_HOST}" != "Msys" ]; then
404+
# TODO: support UDP on Windows
405+
INFO "Run a coredns container with port forwarding 127.0.0.1:10053/udp"
406+
limactl shell "$NAME" $sudo $CONTAINER_ENGINE pull --quiet ${coredns_image}
407+
limactl shell "$NAME" $sudo $CONTAINER_ENGINE run -d --name coredns -p 127.0.0.1:10053:53/udp ${coredns_image}
408+
dig @127.0.0.1 -p 10053 lima-vm.io
409+
limactl shell "$NAME" $sudo $CONTAINER_ENGINE rm -f coredns
410+
fi
411+
401412
set +x
402413
if [[ -n ${CHECKS["mount-home"]} ]]; then
403414
hometmp="$HOME_HOST/lima-container-engine-test-tmp"

0 commit comments

Comments
 (0)