Skip to content

Commit

Permalink
Make sure buildah pull --all-tags only works with docker transport
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel J Walsh <[email protected]>

Closes: #1319
Approved by: rhatdan
  • Loading branch information
rhatdan authored and rh-atomic-bot committed Feb 20, 2019
1 parent fa71977 commit 57ec39d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/pull.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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" {
Expand All @@ -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 ]
Expand Down Expand Up @@ -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 ]
Expand Down Expand Up @@ -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 ]
}

0 comments on commit 57ec39d

Please sign in to comment.