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
This commit is contained in:
parent
e2616d9acf
commit
d0fb2e48e5
|
@ -2,43 +2,32 @@
|
||||||
|
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="busybox"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setup() {
|
||||||
|
copy_images
|
||||||
|
}
|
||||||
@test "podman images" {
|
@test "podman images" {
|
||||||
run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${IMAGE}
|
|
||||||
echo "$output"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} images
|
run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} images
|
||||||
echo "$output"
|
echo "$output"
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi ${IMAGE}
|
|
||||||
echo "$output"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman images test valid json" {
|
@test "podman images test valid json" {
|
||||||
${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${IMAGE}
|
|
||||||
run ${PODMAN_BINARY} ${PODMAN_OPTIONS} images --format json
|
run ${PODMAN_BINARY} ${PODMAN_OPTIONS} images --format json
|
||||||
echo "$output" | python -m json.tool
|
echo "$output" | python -m json.tool
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi ${IMAGE}
|
|
||||||
echo "$output"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman images check name json output" {
|
@test "podman images check name json output" {
|
||||||
${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${IMAGE}
|
${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi -fa
|
||||||
|
${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${ALPINE}
|
||||||
run ${PODMAN_BINARY} ${PODMAN_OPTIONS} images --format json
|
run ${PODMAN_BINARY} ${PODMAN_OPTIONS} images --format json
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
name=$(echo $output | python -c 'import sys; import json; print(json.loads(sys.stdin.read())[0])["names"][0]')
|
name=$(echo $output | python -c 'import sys; import json; print(json.loads(sys.stdin.read())[0])["names"][0]')
|
||||||
[ "$name" == "docker.io/library/${IMAGE}:latest" ]
|
[ "$name" == "docker.io/library/alpine:latest" ]
|
||||||
run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi ${IMAGE}
|
|
||||||
echo "$output"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman images short options" {
|
@test "podman images short options" {
|
||||||
|
|
|
@ -101,9 +101,6 @@ function setup() {
|
||||||
IMAGE="docker.io/library/fedora:latest"
|
IMAGE="docker.io/library/fedora:latest"
|
||||||
|
|
||||||
@test "run limits test" {
|
@test "run limits test" {
|
||||||
|
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${IMAGE}"
|
|
||||||
|
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --ulimit rtprio=99 --cap-add=sys_nice ${IMAGE} cat /proc/self/sched"
|
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --ulimit rtprio=99 --cap-add=sys_nice ${IMAGE} cat /proc/self/sched"
|
||||||
echo $output
|
echo $output
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
|
|
|
@ -11,9 +11,6 @@ function setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "run pidns test" {
|
@test "run pidns test" {
|
||||||
|
|
||||||
${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${ALPINE}
|
|
||||||
|
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run ${ALPINE} sh -c 'echo \$\$'"
|
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run ${ALPINE} sh -c 'echo \$\$'"
|
||||||
echo $output
|
echo $output
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
|
@ -32,9 +29,6 @@ function setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "run ipcns test" {
|
@test "run ipcns test" {
|
||||||
|
|
||||||
${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${ALPINE}
|
|
||||||
|
|
||||||
tmp=$(mktemp /dev/shm/foo.XXXXX)
|
tmp=$(mktemp /dev/shm/foo.XXXXX)
|
||||||
run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run --ipc=host ${ALPINE} ls $tmp
|
run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run --ipc=host ${ALPINE} ls $tmp
|
||||||
echo $output
|
echo $output
|
||||||
|
|
|
@ -2,17 +2,16 @@
|
||||||
|
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
IMAGE="alpine:latest"
|
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
cleanup_test
|
cleanup_test
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setup() {
|
||||||
|
copy_images
|
||||||
|
}
|
||||||
|
|
||||||
@test "podman tag with shortname:latest" {
|
@test "podman tag with shortname:latest" {
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pull $IMAGE"
|
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag ${ALPINE} foobar:latest"
|
||||||
echo "$output"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag $IMAGE foobar:latest"
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:latest"
|
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:latest"
|
||||||
echo "$output"
|
echo "$output"
|
||||||
|
@ -22,10 +21,7 @@ function teardown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman tag with shortname" {
|
@test "podman tag with shortname" {
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pull $IMAGE"
|
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag ${ALPINE} foobar"
|
||||||
echo "$output"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag $IMAGE foobar"
|
|
||||||
echo "$output"
|
echo "$output"
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:latest"
|
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:latest"
|
||||||
|
@ -36,10 +32,7 @@ function teardown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman tag with shortname:tag" {
|
@test "podman tag with shortname:tag" {
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pull $IMAGE"
|
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag ${ALPINE} foobar:v"
|
||||||
echo "$output"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag $IMAGE foobar:v"
|
|
||||||
echo "$output"
|
echo "$output"
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:v"
|
run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:v"
|
||||||
|
|
Loading…
Reference in New Issue