Files
podman/test/podman_tag.bats
baude d0fb2e48e5 Don't pull cached images
In our tests, each test instance is already seeded with images.  In that case,
we do not need to pull down an image that is already seeded.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #191
Approved by: baude
2018-01-08 15:44:49 +00:00

44 lines
1.1 KiB
Bash

#!/usr/bin/env bats
load helpers
function teardown() {
cleanup_test
}
function setup() {
copy_images
}
@test "podman tag with shortname:latest" {
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag ${ALPINE} foobar:latest"
[ "$status" -eq 0 ]
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:latest"
echo "$output"
[ "$status" -eq 0 ]
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi --force foobar:latest"
[ "$status" -eq 0 ]
}
@test "podman tag with shortname" {
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag ${ALPINE} foobar"
echo "$output"
[ "$status" -eq 0 ]
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:latest"
echo "$output"
[ "$status" -eq 0 ]
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi --force foobar:latest"
[ "$status" -eq 0 ]
}
@test "podman tag with shortname:tag" {
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag ${ALPINE} foobar:v"
echo "$output"
[ "$status" -eq 0 ]
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:v"
echo "$output"
[ "$status" -eq 0 ]
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi --force foobar:v"
[ "$status" -eq 0 ]
}