summaryrefslogtreecommitdiff
path: root/test/system/120-load.bats
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2020-08-17 07:02:34 -0600
committerEd Santiago <santiago@redhat.com>2020-08-19 08:12:14 -0600
commitd254fa4c35d81992084ddad300adf487239808db (patch)
treec8c4073af1647be06f997c27db7e8b5e7ba0cbd4 /test/system/120-load.bats
parentdd4e0da4241ac0b6deac3f5e07ea4eeb5819379e (diff)
downloadpodman-d254fa4c35d81992084ddad300adf487239808db.tar.gz
podman-d254fa4c35d81992084ddad300adf487239808db.tar.bz2
podman-d254fa4c35d81992084ddad300adf487239808db.zip
system tests: enable more remote tests; cleanup
info, images, run, networking tests: remove some skip_if_remote()s that were added in the varlink days. All of these tests now seem to work with APIv2. help test: check that first output line from 'podman --help' is the program description (regression check for #7273). load test: clean up stray images, rewrite test to make it conform to existing convention. In the process, discover and file #7337 exec test (and networking): file #7360, and add FIXME comment to skip()s suggesting evaluating those tests once that is fixed. pod test: now that #6328 is fixed, use 'podman pod inspect --format' instead of relying on jq Various other tests: add an explanation of why test is disabled so we can more easily distinguish "this will never be meaningful under remote" vs "hey, doesn't work for now, but maybe someday". Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/120-load.bats')
-rw-r--r--test/system/120-load.bats18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/system/120-load.bats b/test/system/120-load.bats
index 14dae4c8a..86b396c4a 100644
--- a/test/system/120-load.bats
+++ b/test/system/120-load.bats
@@ -27,13 +27,25 @@ verify_iid_and_name() {
}
@test "podman save to pipe and load" {
+ get_iid_and_name
+
# We can't use run_podman because that uses the BATS 'run' function
# which redirects stdout and stderr. Here we need to guarantee
# that podman's stdout is a pipe, not any other form of redirection
- $PODMAN save --format oci-archive $IMAGE | cat >$PODMAN_TMPDIR/test.tar
- [ $status -eq 0 ]
+ $PODMAN save --format oci-archive $IMAGE | cat >$archive
+ if [ "$status" -ne 0 ]; then
+ die "Command failed: podman save ... | cat"
+ fi
+
+ # Make sure we can reload it
+ # FIXME: when/if 7337 gets fixed, add a random tag instead of rmi'ing
+ # FIXME: when/if 7371 gets fixed, use verify_iid_and_name()
+ run_podman rmi $iid
+ run_podman load -i $archive
- run_podman load -i $PODMAN_TMPDIR/test.tar
+ # FIXME: cannot compare IID, see #7371
+ run_podman images -a --format '{{.Repository}}:{{.Tag}}'
+ is "$output" "$IMAGE" "image preserves name across save/load"
}