Skip to content

Commit

Permalink
Update kpod push test
Browse files Browse the repository at this point in the history
Since we've got stable image IDs now, pushing an image from local
storage to local storage ends up attaching the both names to a single
image, so we need to update the test's expectations.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
  • Loading branch information
nalind committed Oct 31, 2017
1 parent 9dab0ee commit beef448
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions test/kpod_push.bats
Expand Up @@ -9,13 +9,24 @@ function teardown() {
}

@test "kpod push to containers/storage" {
run ${KPOD_BINARY} $KPOD_OPTIONS pull "$IMAGE"
echo # Pull down the image: it gets the name $IMAGE.
run ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug pull "$IMAGE"
echo "$output"
[ "$status" -eq 0 ]
run ${KPOD_BINARY} $KPOD_OPTIONS push "$IMAGE" containers-storage:busybox:test
echo # Push the image right back into storage: it now has two names.
run ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug push "$IMAGE" containers-storage:busybox:test
echo "$output"
[ "$status" -eq 0 ]
run ${KPOD_BINARY} $KPOD_OPTIONS rmi "$IMAGE" busybox:test
echo # Try to remove it using the first name. Should be refused.
run ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug rmi "$IMAGE"
echo "$output"
[ "$status" -ne 0 ]
echo # Try to remove it using the second name. Should also be refused.
run ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug rmi busybox:test
echo "$output"
[ "$status" -ne 0 ]
echo # Force removal despite having multiple names. Should succeed.
run ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug rmi -f busybox:test
echo "$output"
[ "$status" -eq 0 ]
}
Expand Down

0 comments on commit beef448

Please sign in to comment.