summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-10 18:27:39 +0100
committerGitHub <noreply@github.com>2021-11-10 18:27:39 +0100
commit4bf0146c2978960b8c4dc5a9844c4948effbcfd2 (patch)
tree1379f5b34f945ced30c2797432208203b02e1bf2 /test
parent2e6231bcbc05fe204a2b667252fb424b1a25cd00 (diff)
parent1ef66d6d7f215c51e582bdf21b04802b705881a4 (diff)
downloadpodman-4bf0146c2978960b8c4dc5a9844c4948effbcfd2.tar.gz
podman-4bf0146c2978960b8c4dc5a9844c4948effbcfd2.tar.bz2
podman-4bf0146c2978960b8c4dc5a9844c4948effbcfd2.zip
Merge pull request #12255 from vrothberg/fix-11970
podman load: support downloading files
Diffstat (limited to 'test')
-rw-r--r--test/system/120-load.bats20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/system/120-load.bats b/test/system/120-load.bats
index e9959271f..a5508b2f4 100644
--- a/test/system/120-load.bats
+++ b/test/system/120-load.bats
@@ -126,6 +126,26 @@ verify_iid_and_name() {
verify_iid_and_name $img_name
}
+@test "podman load - from URL" {
+ get_iid_and_name
+ run_podman save $img_name -o $archive
+ run_podman rmi $iid
+
+ HOST_PORT=$(random_free_port)
+ SERVER=http://127.0.0.1:$HOST_PORT
+
+ # Bind-mount the archive to a container running httpd
+ run_podman run -d --name myweb -p "$HOST_PORT:80" \
+ -v $archive:/var/www/image.tar:Z \
+ -w /var/www \
+ $IMAGE /bin/busybox-extras httpd -f -p 80
+
+ run_podman load -i $SERVER/image.tar
+ verify_iid_and_name $img_name
+
+ run_podman rm -f -t0 myweb
+}
+
@test "podman load - redirect corrupt payload" {
run_podman 125 load <<< "Danger, Will Robinson!! This is a corrupt tarball!"
is "$output" \