diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-19 20:31:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-19 20:31:45 +0200 |
commit | 15073f444e1e65881bc84eeeb275a564f39fb51e (patch) | |
tree | f1514a4eeb89860332248d620d195c76f047618c /test/system/120-load.bats | |
parent | d6ae56113a4cff36b358f71e9ffc5e5eb6c6e9b3 (diff) | |
parent | d254fa4c35d81992084ddad300adf487239808db (diff) | |
download | podman-15073f444e1e65881bc84eeeb275a564f39fb51e.tar.gz podman-15073f444e1e65881bc84eeeb275a564f39fb51e.tar.bz2 podman-15073f444e1e65881bc84eeeb275a564f39fb51e.zip |
Merge pull request #7362 from edsantiago/bats
system tests: enable more remote tests; cleanup
Diffstat (limited to 'test/system/120-load.bats')
-rw-r--r-- | test/system/120-load.bats | 18 |
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" } |