diff options
author | Adrian Reber <areber@redhat.com> | 2019-07-29 17:21:45 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2019-09-07 15:59:56 +0300 |
commit | bbd922ed32ece54830380abe7706c111203f1774 (patch) | |
tree | b307fdbb34a3de5ba7ec6169bbfedb23b0520c68 /scripts/travis | |
parent | 2a76ecc9fd3f01e40f8a28ca5e005c8be7d9e116 (diff) |
travis: add podman test case
This adds the same tests currently running for docker also for podman.
In addition this also tests podman --export/--import (migration)
support.
Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'scripts/travis')
-rw-r--r-- | scripts/travis/Makefile | 3 | ||||
-rwxr-xr-x | scripts/travis/podman-test.sh | 69 |
2 files changed, 72 insertions, 0 deletions
diff --git a/scripts/travis/Makefile b/scripts/travis/Makefile index 77c937432..baddd6eb1 100644 --- a/scripts/travis/Makefile +++ b/scripts/travis/Makefile @@ -38,5 +38,8 @@ fedora-asan: docker-test: ./docker-test.sh +podman-test: + ./podman-test.sh + %: $(MAKE) -C ../build $@$(target-suffix) diff --git a/scripts/travis/podman-test.sh b/scripts/travis/podman-test.sh new file mode 100755 index 000000000..9bd1f3d8b --- /dev/null +++ b/scripts/travis/podman-test.sh @@ -0,0 +1,69 @@ +#!/bin/bash +set -x -e -o pipefail + +add-apt-repository -y ppa:projectatomic/ppa + +apt-get install -qq \ + apt-transport-https \ + ca-certificates \ + curl \ + software-properties-common + +apt-get update -qq + +apt-get install -qqy podman + +export SKIP_TRAVIS_TEST=1 + +./travis-tests + +cd ../../ + +make install + +podman info + +criu --version + +podman run --name cr -d docker.io/library/alpine /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done' + +sleep 1 +for i in `seq 50`; do + echo "Test $i for podman container checkpoint" + podman exec cr ps axf + podman logs cr + [ `podman ps -f name=cr -q | wc -l` -eq "1" ] + podman container checkpoint cr + [ `podman ps -f name=cr -q | wc -l` -eq "0" ] + podman ps -a + podman container restore cr + [ `podman ps -f name=cr -q | wc -l` -eq "1" ] + podman logs cr +done + +for i in `seq 50`; do + echo "Test $i for podman container checkpoint --export" + podman ps -a + podman exec cr ps axf + podman logs cr + [ `podman ps -f name=cr -q | wc -l` -eq "1" ] + podman container checkpoint -l --export /tmp/chkpt.tar.gz + [ `podman ps -f name=cr -q | wc -l` -eq "0" ] + podman ps -a + podman rm -fa + podman ps -a + podman container restore --import /tmp/chkpt.tar.gz + [ `podman ps -f name=cr -q | wc -l` -eq "1" ] + podman container restore --name cr2 --import /tmp/chkpt.tar.gz + [ `podman ps -f name=cr2 -q | wc -l` -eq "1" ] + podman ps -a + podman logs cr + podman logs cr2 + podman ps -a + podman rm -fa + podman ps -a + podman container restore --import /tmp/chkpt.tar.gz + [ `podman ps -f name=cr -q | wc -l` -eq "1" ] + podman ps -a + rm -f /tmp/chkpt.tar.gz +done |