criu/tests/run-podman-checkpoint-restore.sh
Radostin Stoyanov 3446799524
Disable podman test when c/r is not supported
Resolves: rhbz#2000882
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-09-06 10:02:26 +01:00

33 lines
682 B
Bash
Executable File

#!/bin/bash
set -eux
ls -la
if ! crun checkpoint --help; then
echo "crun doesn't support checkpoint/restore"
exit 0
fi
echo "Start container"
podman --log-level debug run -d quay.io/adrianreber/counter
echo "See which containers are running"
podman ps
echo "Connect to the container"
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088
echo "Checkpoint container"
podman --log-level debug container checkpoint -l
podman ps -a
echo "Restore container"
podman --log-level debug container restore -l
podman ps -a
echo "Check if we can connect to the restored container"
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088
ls -la