summaryrefslogtreecommitdiff
path: root/test/system/120-load.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/120-load.bats')
-rw-r--r--test/system/120-load.bats20
1 files changed, 16 insertions, 4 deletions
diff --git a/test/system/120-load.bats b/test/system/120-load.bats
index 97ea0f528..e9959271f 100644
--- a/test/system/120-load.bats
+++ b/test/system/120-load.bats
@@ -11,7 +11,7 @@ load helpers
# initialize, read image ID and name
get_iid_and_name() {
run_podman images -a --format '{{.ID}} {{.Repository}}:{{.Tag}}'
- read iid img_name < <(echo "$output")
+ read iid img_name <<<"$output"
archive=$PODMAN_TMPDIR/myimage-$(random_string 8).tar
}
@@ -32,7 +32,7 @@ verify_iid_and_name() {
echo "I am an invalid file and should cause a podman-load error" > $invalid
run_podman 125 load -i $invalid
# podman and podman-remote emit different messages; this is a common string
- is "$output" ".*payload does not match any of the supported image formats .*" \
+ is "$output" ".*payload does not match any of the supported image formats:.*" \
"load -i INVALID fails with expected diagnostic"
}
@@ -62,7 +62,7 @@ verify_iid_and_name() {
# FIXME: cannot compare IID, see #7371, so we check only the tag
run_podman images $fqin --format '{{.Repository}}:{{.Tag}}'
- is "$output" "$fqin" "image preserves name across save/load"
+ is "${lines[0]}" "$fqin" "image preserves name across save/load"
# Load with a new tag
local new_name=x1$(random_string 14 | tr A-Z a-z)
@@ -129,7 +129,7 @@ verify_iid_and_name() {
@test "podman load - redirect corrupt payload" {
run_podman 125 load <<< "Danger, Will Robinson!! This is a corrupt tarball!"
is "$output" \
- ".*payload does not match any of the supported image formats .*" \
+ ".*payload does not match any of the supported image formats:.*" \
"Diagnostic from 'podman load' unknown/corrupt payload"
}
@@ -183,4 +183,16 @@ verify_iid_and_name() {
run_podman rmi -f $img1 $img2
}
+@test "podman save --oci-accept-uncompressed-layers" {
+ archive=$PODMAN_TMPDIR/myimage-$(random_string 8).tar
+ untar=$PODMAN_TMPDIR/myuntar-$(random_string 8)
+ mkdir -p $untar
+
+ # Create a tarball, unpack it and make sure the layers are uncompressed.
+ run_podman save -o $archive --format oci-archive --uncompressed $IMAGE
+ run tar -C $untar -xvf $archive
+ run file $untar/blobs/sha256/*
+ is "$output" ".*POSIX tar archive" "layers are uncompressed"
+}
+
# vim: filetype=sh