diff --git a/tests/p_podman/00_install_podman.sh b/tests/p_podman/00_install_podman.sh new file mode 100755 index 0000000..b6e1cae --- /dev/null +++ b/tests/p_podman/00_install_podman.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# Author: Carlos Rodriguez-Fernandez + +t_Log "Running $0 -installing podman." +t_InstallPackage podman diff --git a/tests/p_podman/10_podman_tests.sh b/tests/p_podman/10_podman_tests.sh new file mode 100755 index 0000000..ed2efb3 --- /dev/null +++ b/tests/p_podman/10_podman_tests.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Author: Carlos Rodriguez-Fernandez + +t_Log "Running $0 - podman tests" + +tests_in_order=( + "podman version" + "podman info" + "podman run --rm quay.io/centos/centos:stream${centos_ver} bash -c 'echo HELLO' | grep -q -e 'HELLO'" + "podman system service -t 1" + "touch ${HOME}/test.txt && \ + podman run --rm --privileged -v ${HOME}/test.txt:/test.txt quay.io/centos/centos:stream${centos_ver} bash -c 'echo HELLO > /test.txt' && \ + grep -q -e 'HELLO' ${HOME}/test.txt && \ + rm -f ${HOME}/test.txt" +) + +for cmd in "${tests_in_order[@]}"; do + t_Log "Running $0: ${cmd}" + if ! eval "${cmd}" > /dev/null 2>&1; then + t_Log "FAIL: $0: ${cmd}" + exit 1 + else + t_Log "PASS: $0: ${cmd}" + fi +done