diff options
-rw-r--r-- | cmd/podman/save.go | 13 | ||||
-rw-r--r-- | test/podman_save.bats | 16 |
2 files changed, 21 insertions, 8 deletions
diff --git a/cmd/podman/save.go b/cmd/podman/save.go index 85a8c7930..9ba1cc829 100644 --- a/cmd/podman/save.go +++ b/cmd/podman/save.go @@ -43,12 +43,13 @@ var ( Default is docker-archive` saveCommand = cli.Command{ - Name: "save", - Usage: "Save image to an archive", - Description: saveDescription, - Flags: saveFlags, - Action: saveCmd, - ArgsUsage: "", + Name: "save", + Usage: "Save image to an archive", + Description: saveDescription, + Flags: saveFlags, + Action: saveCmd, + ArgsUsage: "", + SkipArgReorder: true, } ) diff --git a/test/podman_save.bats b/test/podman_save.bats index 9c6fa8b86..5adfb8fea 100644 --- a/test/podman_save.bats +++ b/test/podman_save.bats @@ -43,16 +43,28 @@ function setup() { [ "$status" -ne 0 ] } -@test "podman save to directory wit oci format" { +@test "podman save to directory with oci format" { run ${PODMAN_BINARY} ${PODMAN_OPTIONS} save --format oci-dir -o alp-dir $ALPINE echo "$output" [ "$status" -eq 0 ] rm -rf alp-dir } -@test "podman save to directory wit v2s2 (docker) format" { +@test "podman save to directory with v2s2 (docker) format" { run ${PODMAN_BINARY} ${PODMAN_OPTIONS} save --format docker-dir -o alp-dir $ALPINE echo "$output" [ "$status" -eq 0 ] rm -rf alp-dir } + +@test "podman save to directory with compression" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} save --compress --format docker-dir -o alp-dir $ALPINE + echo "$output" + [ "$status" -eq 0 ] + rm -rf alp-dir + + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} save --format docker-dir --compress -o alp-dir $ALPINE + echo "$output" + [ "$status" -eq 0 ] + rm -rf alp-dir +} |