diff options
author | Qi Wang <qiwan@redhat.com> | 2020-07-23 15:54:12 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2020-08-20 12:16:52 -0400 |
commit | 34f4a892e4056dd660db85db6ee8baa0470dd6f2 (patch) | |
tree | 8c5604df8da7aedc414a9662924de771d31ee285 /test/system | |
parent | ceae3a99d54154fac6073f30bba2618768d05362 (diff) | |
download | podman-34f4a892e4056dd660db85db6ee8baa0470dd6f2.tar.gz podman-34f4a892e4056dd660db85db6ee8baa0470dd6f2.tar.bz2 podman-34f4a892e4056dd660db85db6ee8baa0470dd6f2.zip |
podman save use named pipe
podman save uses named pipe as output path, not directly using /dev/stdout.
fix #7017
Signed-off-by: Qi Wang <qiwan@redhat.com>
<MH: Corrected imports during cherry-pick>
Signed-off-by: Matt Heon <matthew.heon@pm.me>
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/120-load.bats | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/system/120-load.bats b/test/system/120-load.bats index 611799f8d..ec959ca73 100644 --- a/test/system/120-load.bats +++ b/test/system/120-load.bats @@ -26,6 +26,16 @@ verify_iid_and_name() { is "$new_img_name" "$1" "Name & tag of restored image" } +@test "podman save to pipe and load" { + # 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 ] + + run_podman load -i $PODMAN_TMPDIR/test.tar +} + @test "podman load - by image ID" { skip_if_remote "FIXME: pending #7123" |