From 57ec39d2756ca34f86eaececbadfd471f6655e0b Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 19 Feb 2019 08:37:39 -0500 Subject: [PATCH] Make sure buildah pull --all-tags only works with docker transport Signed-off-by: Daniel J Walsh Closes: #1319 Approved by: rhatdan --- tests/pull.bats | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/pull.bats b/tests/pull.bats index f4bfea317bb..068d2c3c8a7 100644 --- a/tests/pull.bats +++ b/tests/pull.bats @@ -84,6 +84,12 @@ load helpers echo "$output" [ "$status" -eq 0 ] [[ "$output" =~ "alpine" ]] + run buildah pull --all-tags --signature-policy ${TESTSDIR}/policy.json docker-archive:${TESTDIR}/alp.tar + echo "$output" + [ "$status" -ne 0 ] + run rm -rf ${TESTDIR}/alp.tar + echo "$output" + [ "$status" -eq 0 ] } @test "pull-from-oci-archive" { @@ -103,6 +109,12 @@ load helpers echo "$output" [ "$status" -eq 0 ] [[ "$output" =~ "alpine" ]] + run buildah pull --all-tags --signature-policy ${TESTSDIR}/policy.json oci-archive:${TESTDIR}/alp.tar + echo "$output" + [ "$status" -ne 0 ] + run rm -rf ${TESTDIR}/alp.tar + echo "$output" + [ "$status" -eq 0 ] } @test "pull-from-local-directory" { @@ -123,6 +135,9 @@ load helpers echo "$output" [ "$status" -eq 0 ] [[ "$output" =~ "buildahtest" ]] + run buildah pull --all-tags --signature-policy ${TESTSDIR}/policy.json dir:${TESTDIR}/buildahtest + echo "$output" + [ "$status" -ne 0 ] run rm -rf ${TESTDIR}/buildahtest echo "$output" [ "$status" -eq 0 ] @@ -151,6 +166,9 @@ load helpers run buildah rmi alpine echo "$output" [ "$status" -eq 0 ] + run buildah pull --all-tags --signature-policy ${TESTSDIR}/policy.json docker-daemon:docker.io/library/alpine:latest + echo "$output" + [ "$status" -ne 0 ] run docker rmi -f alpine:latest echo "$output" [ "$status" -eq 0 ] @@ -215,4 +233,16 @@ load helpers echo "$output" [ "$status" -eq 0 ] [[ "$output" =~ "alpine" ]] + run buildah pull --all-tags --signature-policy ${TESTSDIR}/policy.json oci:${TESTDIR}/alpine + echo "$output" + [ "$status" -ne 0 ] + run rm -rf ${TESTDIR}/alpine + echo "$output" + [ "$status" -eq 0 ] +} + +@test "pull-with-alltags-from-registry" { + run buildah pull --all-tags --registries-conf ${TESTSDIR}/registries.conf --signature-policy ${TESTSDIR}/policy.json quay.io/libpod/alpine_nginx + echo "$output" + [ "$status" -eq 0 ] }