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 <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2017-10-24 15:39:27 -04:00
parent 9dab0eee24
commit beef44840e
1 changed files with 14 additions and 3 deletions

View File

@ -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 ]
}