diff options
author | Ed Santiago <santiago@redhat.com> | 2020-09-16 10:06:33 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2020-09-19 15:55:00 -0600 |
commit | bd3c66fc8151350ad6562959054eddb5508cf028 (patch) | |
tree | 487c34a3af99796784538929d8cc61a536a07622 /test/system/helpers.bash | |
parent | 852943516606f32ccc2406f41bcf3df42d7c622c (diff) | |
download | podman-bd3c66fc8151350ad6562959054eddb5508cf028.tar.gz podman-bd3c66fc8151350ad6562959054eddb5508cf028.tar.bz2 podman-bd3c66fc8151350ad6562959054eddb5508cf028.zip |
system tests: new tests
- podman network create: new test
- podman pull by-sha + podman images -a (#7651)
- podman image mount: new test
- podman pod: --infra-image and --infra-command (#7167)
For convenience and robustness, build a new testimage
containing a custom file /home/podman/testimage-id
with contents YYYYMMDD (same as image tag). The
image-mount test checks that this file exists and
has the desired content. New testimage also includes
a dummy 'pause' executable, for testing pod infra.
Updates from testimage:20200902 to :20200917
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r-- | test/system/helpers.bash | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash index 514ba249e..c361e23ff 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -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:-"20200902"} +PODMAN_TEST_IMAGE_TAG=${PODMAN_TEST_IMAGE_TAG:-"20200917"} PODMAN_TEST_IMAGE_FQN="$PODMAN_TEST_IMAGE_REGISTRY/$PODMAN_TEST_IMAGE_USER/$PODMAN_TEST_IMAGE_NAME:$PODMAN_TEST_IMAGE_TAG" # Because who wants to spell that out each time? @@ -397,6 +397,35 @@ function random_string() { } +########################### +# random_rfc1918_subnet # +########################### +# +# Use the class B set, because much of our CI environment (Google, RH) +# already uses up much of the class A, and it's really hard to test +# if a block is in use. +# +# This returns THREE OCTETS! It is up to our caller to append .0/24, .255, &c. +# +function random_rfc1918_subnet() { + local retries=1024 + + while [ "$retries" -gt 0 ];do + local cidr=172.$(( 16 + $RANDOM % 16 )).$(( $RANDOM & 255 )) + + in_use=$(ip route list | fgrep $cidr) + if [ -z "$in_use" ]; then + echo "$cidr" + return + fi + + retries=$(( retries - 1 )) + done + + die "Could not find a random not-in-use rfc1918 subnet" +} + + ######################### # find_exec_pid_files # Returns nothing or exec_pid hash files ######################### |