aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-12 23:26:03 +0200
committerGitHub <noreply@github.com>2020-08-12 23:26:03 +0200
commitd777a7bd5c920ce3cf06c4eba25068747dbc6b8f (patch)
tree7dd494a3abbc7c35b9a93720b5219ab072f269ad /test
parentacae04aaaf1235ee2e2475d97155783dc4aefc9f (diff)
parent49dea06037e1254a1dbe0064942e7329079388ec (diff)
downloadpodman-d777a7bd5c920ce3cf06c4eba25068747dbc6b8f.tar.gz
podman-d777a7bd5c920ce3cf06c4eba25068747dbc6b8f.tar.bz2
podman-d777a7bd5c920ce3cf06c4eba25068747dbc6b8f.zip
Merge pull request #7073 from QiWang19/save-stdout
podman save use named pipe
Diffstat (limited to 'test')
-rw-r--r--test/system/120-load.bats10
1 files changed, 10 insertions, 0 deletions
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?