From 49dea06037e1254a1dbe0064942e7329079388ec Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Thu, 23 Jul 2020 15:54:12 -0400 Subject: 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 --- test/system/120-load.bats | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/system/120-load.bats b/test/system/120-load.bats index 2fcabcd8a..14dae4c8a 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" { # FIXME: how to build a simple archive instead? -- cgit v1.2.3-54-g00ecf