summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-01-23 17:10:47 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-25 02:28:07 +0000
commit49576a1fb107eb691cee9757465f060817702d43 (patch)
tree5d8fd2ebb121b1e598a356af46f0e2c52d7ff751
parent97f234190f9641dabecdefb05ffe52103621da90 (diff)
downloadpodman-49576a1fb107eb691cee9757465f060817702d43.tar.gz
podman-49576a1fb107eb691cee9757465f060817702d43.tar.bz2
podman-49576a1fb107eb691cee9757465f060817702d43.zip
Fix issue with order of flags
The order of the flags was casuing issue. Enabled SkipArgReorder to fix the problem. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #259 Approved by: rhatdan
-rw-r--r--cmd/podman/save.go13
-rw-r--r--test/podman_save.bats16
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
+}