mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08:00

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
44 lines
1.1 KiB
Bash
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 ]
|
|
}
|