Skip to content

Commit

Permalink
Merge pull request #16220 from edsantiago/testimage_iproute_socat
Browse files Browse the repository at this point in the history
testimage: add iproute2 & socat, for pasta networking
  • Loading branch information
openshift-merge-robot authored Oct 19, 2022
2 parents f6053ce + 120a77e commit 2936e60
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions test/system/260-sdnotify.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/system/270-socket-activation.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions test/system/build-testimage
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/system/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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=

Expand Down

0 comments on commit 2936e60

Please sign in to comment.