diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/podman_build.bats | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/test/podman_build.bats b/test/podman_build.bats index 159737019..91bb573f8 100644 --- a/test/podman_build.bats +++ b/test/podman_build.bats @@ -7,10 +7,10 @@ load helpers skip "Buildah not installed" fi target=scratch-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} ${BUILDAH_TESTSDIR}/build/from-scratch + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} ${BUILDAH_TESTSDIR}/build/from-scratch cid=$(buildah from ${target}) - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] [ "$status" -eq 0 ] @@ -21,29 +21,29 @@ load helpers skip "Buildah not installed" fi target=scratch-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.scratch -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.nofrom + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.scratch -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.nofrom cid=$(buildah from ${target}) root=$(buildah mount ${cid}) cmp $root/Dockerfile1 ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.scratch cmp $root/Dockerfile2.nofrom ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.nofrom run test -s $root/etc/passwd [ "$status" -ne 0 ] - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$status" -eq 0 ] [ "$output" = "" ] target=alpine-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.alpine -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.nofrom + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.alpine -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.nofrom cid=$(buildah from ${target}) root=$(buildah mount ${cid}) cmp $root/Dockerfile1 ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.alpine cmp $root/Dockerfile2.nofrom ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.nofrom run test -s $root/etc/passwd [ "$status" -eq 0 ] - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$status" -eq 0 ] [ "$output" = "" ] @@ -54,29 +54,29 @@ load helpers skip "Buildah not installed" fi target=scratch-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.scratch -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.withfrom + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.scratch -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.withfrom cid=$(buildah from ${target}) root=$(buildah mount ${cid}) cmp $root/Dockerfile1 ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.scratch cmp $root/Dockerfile2.withfrom ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.withfrom run test -s $root/etc/passwd [ "$status" -ne 0 ] - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$status" -eq 0 ] [ "$output" = "" ] target=alpine-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.alpine -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.withfrom + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.alpine -f ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.withfrom cid=$(buildah from ${target}) root=$(buildah mount ${cid}) cmp $root/Dockerfile1 ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.alpine cmp $root/Dockerfile2.withfrom ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.withfrom run test -s $root/etc/passwd [ "$status" -eq 0 ] - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$status" -eq 0 ] [ "$output" = "" ] @@ -91,7 +91,7 @@ load helpers skip fi target=volume-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} ${BUILDAH_TESTSDIR}/build/preserve-volumes + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} ${BUILDAH_TESTSDIR}/build/preserve-volumes cid=$(buildah from ${target}) root=$(buildah mount ${cid}) test -s $root/vol/subvol/subsubvol/subsubvolfile @@ -102,8 +102,8 @@ load helpers test -s $root/vol/Dockerfile2 run test -s $root/vol/anothervolfile [ "$status" -ne 0 ] - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -114,11 +114,11 @@ load helpers fi starthttpd ${BUILDAH_TESTSDIR}/build/from-scratch target=scratch-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f http://0.0.0.0:${HTTP_SERVER_PORT}/Dockerfile . + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f http://0.0.0.0:${HTTP_SERVER_PORT}/Dockerfile . stophttpd cid=$(buildah from ${target}) - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -129,11 +129,11 @@ load helpers fi starthttpd ${BUILDAH_TESTSDIR}/build/http-context target=scratch-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} http://0.0.0.0:${HTTP_SERVER_PORT}/context.tar + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} http://0.0.0.0:${HTTP_SERVER_PORT}/context.tar stophttpd cid=$(buildah from ${target}) - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -144,11 +144,11 @@ load helpers fi starthttpd ${BUILDAH_TESTSDIR}/build/http-context-subdir target=scratch-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f context/Dockerfile http://0.0.0.0:${HTTP_SERVER_PORT}/context.tar + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f context/Dockerfile http://0.0.0.0:${HTTP_SERVER_PORT}/context.tar stophttpd cid=$(buildah from ${target}) - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -159,11 +159,11 @@ load helpers fi starthttpd ${BUILDAH_TESTSDIR}/build/http-context-subdir target=scratch-image - kpod build http://0.0.0.0:${HTTP_SERVER_PORT}/context.tar --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f context/Dockerfile + podman build http://0.0.0.0:${HTTP_SERVER_PORT}/context.tar --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f context/Dockerfile stophttpd cid=$(buildah from ${target}) - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -182,10 +182,10 @@ load helpers target=giturl-image # Any repo should do, but this one is small and is FROM: scratch. gitrepo=git://github.com/projectatomic/nulecule-library - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} "${gitrepo}" + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} "${gitrepo}" cid=$(buildah from ${target}) - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -197,11 +197,11 @@ load helpers target=github-image # Any repo should do, but this one is small and is FROM: scratch. gitrepo=github.com/projectatomic/nulecule-library - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} "${gitrepo}" + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} "${gitrepo}" cid=$(buildah from ${target}) - kpod rm ${cid} + podman rm ${cid} buildah --debug=false images -q - kpod rmi $(buildah --debug=false images -q) + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -213,15 +213,15 @@ load helpers target=scratch-image target2=another-scratch-image target3=so-many-scratch-images - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -t ${target2} -t ${target3} ${BUILDAH_TESTSDIR}/build/from-scratch + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -t ${target2} -t ${target3} ${BUILDAH_TESTSDIR}/build/from-scratch run buildah --debug=false images cid=$(buildah from ${target}) - kpod rm ${cid} + podman rm ${cid} cid=$(buildah from library/${target2}) - kpod rm ${cid} + podman rm ${cid} cid=$(buildah from ${target3}:latest) - kpod rm ${cid} - kpod rmi -f $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi -f $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -235,15 +235,15 @@ load helpers skip fi target=volume-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} ${BUILDAH_TESTSDIR}/build/volume-perms + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} ${BUILDAH_TESTSDIR}/build/volume-perms cid=$(buildah from ${target}) root=$(buildah mount ${cid}) run test -s $root/vol/subvol/subvolfile [ "$status" -ne 0 ] run stat -c %f $root/vol/subvol [ "$output" = 41ed ] - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } @@ -253,13 +253,13 @@ load helpers skip "Buildah not installed" fi target=alpine-image - kpod build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f Dockerfile2.glob ${BUILDAH_TESTSDIR}/build/from-multiple-files + podman build --signature-policy ${BUILDAH_TESTSDIR}/policy.json -t ${target} -f Dockerfile2.glob ${BUILDAH_TESTSDIR}/build/from-multiple-files cid=$(buildah from ${target}) root=$(buildah mount ${cid}) cmp $root/Dockerfile1.alpine ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile1.alpine cmp $root/Dockerfile2.withfrom ${BUILDAH_TESTSDIR}/build/from-multiple-files/Dockerfile2.withfrom - kpod rm ${cid} - kpod rmi $(buildah --debug=false images -q) + podman rm ${cid} + podman rmi $(buildah --debug=false images -q) run buildah --debug=false images -q [ "$output" = "" ] } |