diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2017-12-15 16:58:36 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-18 16:46:05 +0000 |
commit | 5770dc2640c216525ab84031e3712fcc46b3b087 (patch) | |
tree | 8a1c5c4e4a6ce6a35a3767247623a62bfd698f77 /test/podman_pull.bats | |
parent | de3468e120d489d046c08dad72ba2262e222ccb1 (diff) | |
download | podman-5770dc2640c216525ab84031e3712fcc46b3b087.tar.gz podman-5770dc2640c216525ab84031e3712fcc46b3b087.tar.bz2 podman-5770dc2640c216525ab84031e3712fcc46b3b087.zip |
Rename all references to kpod to podman
The decision is in, kpod is going to be named podman.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #145
Approved by: umohnani8
Diffstat (limited to 'test/podman_pull.bats')
-rw-r--r-- | test/podman_pull.bats | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/test/podman_pull.bats b/test/podman_pull.bats new file mode 100644 index 000000000..b0de1a8ab --- /dev/null +++ b/test/podman_pull.bats @@ -0,0 +1,136 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +@test "podman pull from docker with tag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull debian:6.0.10 + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi debian:6.0.10 + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from docker without tag" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull debian + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi debian + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from a non-docker registry with tag" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull registry.fedoraproject.org/fedora:rawhide + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi registry.fedoraproject.org/fedora:rawhide + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from a non-docker registry without tag" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull registry.fedoraproject.org/fedora + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi registry.fedoraproject.org/fedora + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull using digest" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull alpine@sha256:1072e499f3f655a032e88542330cf75b02e7bdf673278f701d7ba61629ee3ebe + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi alpine:latest + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from a non existent image" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull umohnani/get-started + echo "$output" + [ "$status" -ne 0 ] +} + +@test "podman pull from docker with shortname" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull debian + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi docker.io/debian:latest + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from docker with shortname and tag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull debian:6.0.10 + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi docker.io/debian:6.0.10 + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from docker-archive" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alp.tar alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull docker-archive:alp.tar + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + rm -f alp.tar +} + +@test "podman pull from oci-archive" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save --format oci-archive -o oci-alp.tar alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull oci-archive:oci-alp.tar + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + rm -f oci-alp.tar +} + +@test "podman pull from local directory" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull alpine + echo "$output" + [ "$status" -eq 0 ] + run mkdir test_pull_dir + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} push alpine dir:test_pull_dir + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull dir:test_pull_dir + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi test_pull_dir + echo "$output" + [ "$status" -eq 0 ] + rm -rf test_pull_dir +} |