mirror of
https://github.com/containers/podman.git
synced 2025-06-28 14:29:04 +08:00
Merge pull request #16220 from edsantiago/testimage_iproute_socat
testimage: add iproute2 & socat, for pasta networking
This commit is contained in:
@ -41,7 +41,9 @@ function teardown() {
|
||||
function _start_socat() {
|
||||
_SOCAT_LOG="$PODMAN_TMPDIR/socat.log"
|
||||
|
||||
# Reset socat logfile to empty
|
||||
rm -f $_SOCAT_LOG
|
||||
touch $_SOCAT_LOG
|
||||
# Execute in subshell so we can close fd3 (which BATS uses).
|
||||
# This is a superstitious ritual to try to avoid leaving processes behind,
|
||||
# and thus prevent CI hangs.
|
||||
|
@ -101,7 +101,7 @@ function teardown() {
|
||||
die "Pause pid file does not exist: $pause_pid_file"
|
||||
fi
|
||||
|
||||
echo "kill -9 $(< pause_pid_file)"
|
||||
echo "kill -9 $(< $pause_pid_file) [pause process]"
|
||||
kill -9 $(< $pause_pid_file)
|
||||
|
||||
run curl -s --max-time 3 --unix-socket $SERVICE_SOCK_ADDR $_PING
|
||||
|
@ -61,6 +61,8 @@ chmod 755 pause
|
||||
# alpine because it's small and light and reliable
|
||||
# - check for updates @ https://hub.docker.com/_/alpine
|
||||
# busybox-extras provides httpd needed in 500-networking.bats
|
||||
# iproute2 provides JSON output (not in busybox) for 505-networking-pasta.bats
|
||||
# socat offers convenient UDP test termination in 505-networking-pasta.bats
|
||||
#
|
||||
# Two Containerfiles, because we have to do the image build in two parts,
|
||||
# which I think are easier to describe in reverse order:
|
||||
@ -71,9 +73,10 @@ chmod 755 pause
|
||||
#
|
||||
cat >Containerfile1 <<EOF
|
||||
ARG REPO=please-override-repo
|
||||
FROM docker.io/\${REPO}/alpine:3.16.0
|
||||
RUN apk add busybox-extras
|
||||
FROM docker.io/\${REPO}/alpine:3.16.2
|
||||
RUN apk add busybox-extras iproute2 socat
|
||||
ADD testimage-id pause /home/podman/
|
||||
RUN rm -f /var/cache/apk/*
|
||||
EOF
|
||||
|
||||
cat >Containerfile2 <<EOF
|
||||
|
@ -7,7 +7,7 @@ PODMAN=${PODMAN:-podman}
|
||||
PODMAN_TEST_IMAGE_REGISTRY=${PODMAN_TEST_IMAGE_REGISTRY:-"quay.io"}
|
||||
PODMAN_TEST_IMAGE_USER=${PODMAN_TEST_IMAGE_USER:-"libpod"}
|
||||
PODMAN_TEST_IMAGE_NAME=${PODMAN_TEST_IMAGE_NAME:-"testimage"}
|
||||
PODMAN_TEST_IMAGE_TAG=${PODMAN_TEST_IMAGE_TAG:-"20220615"}
|
||||
PODMAN_TEST_IMAGE_TAG=${PODMAN_TEST_IMAGE_TAG:-"20221018"}
|
||||
PODMAN_TEST_IMAGE_FQN="$PODMAN_TEST_IMAGE_REGISTRY/$PODMAN_TEST_IMAGE_USER/$PODMAN_TEST_IMAGE_NAME:$PODMAN_TEST_IMAGE_TAG"
|
||||
PODMAN_TEST_IMAGE_ID=
|
||||
|
||||
|
Reference in New Issue
Block a user