From beef44840e3d5e313738f8da09ef24d4e7f197a8 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 24 Oct 2017 15:39:27 -0400 Subject: [PATCH] Update kpod push test 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 --- test/kpod_push.bats | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/test/kpod_push.bats b/test/kpod_push.bats index 3345f2ab6a7..e8fe4fdbcc5 100644 --- a/test/kpod_push.bats +++ b/test/kpod_push.bats @@ -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 ] }