diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-06-23 11:17:42 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-06-23 14:53:29 +0200 |
commit | 138d447eb450f02d78225d7a976faf9262423380 (patch) | |
tree | b747122bca88a001348513db751ec34f7e851910 /test/system/120-load.bats | |
parent | 9e37fd43e47d32d5bfbc920c6d7aedfad5662ae0 (diff) | |
download | podman-138d447eb450f02d78225d7a976faf9262423380.tar.gz podman-138d447eb450f02d78225d7a976faf9262423380.tar.bz2 podman-138d447eb450f02d78225d7a976faf9262423380.zip |
image load: no args required
Disable the args requirement of `image load`. Instead of requiring a
lower bound, we really need an upper one with at most 1 argument.
Extend the system tests to prevent future regressions.
Fixes: #6718
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test/system/120-load.bats')
-rw-r--r-- | test/system/120-load.bats | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/system/120-load.bats b/test/system/120-load.bats index 15df6adec..f290c1888 100644 --- a/test/system/120-load.bats +++ b/test/system/120-load.bats @@ -44,6 +44,11 @@ verify_iid_and_name() { run_podman load < $archive verify_iid_and_name "<none>:<none>" + # Same as above, using stdin but with `podman image load` + run_podman rmi $iid + run_podman image load < $archive + verify_iid_and_name "<none>:<none>" + # Cleanup: since load-by-iid doesn't preserve name, re-tag it; # otherwise our global teardown will rmi and re-pull our standard image. run_podman tag $iid $img_name @@ -57,9 +62,14 @@ verify_iid_and_name() { # Load using -i; this time the image should be tagged. run_podman load -i $archive verify_iid_and_name $img_name + run_podman rmi $iid - # Same as above, using stdin + # Also make sure that `image load` behaves the same. + run_podman image load -i $archive + verify_iid_and_name $img_name run_podman rmi $iid + + # Same as above, using stdin run_podman load < $archive verify_iid_and_name $img_name } @@ -97,4 +107,10 @@ verify_iid_and_name() { "Diagnostic from 'podman load' without redirection or -i" } +@test "podman load - at most 1 arg(s)" { + run_podman 125 load 1 2 3 + is "$output" \ + "Error: accepts at most 1 arg(s), received 3" +} + # vim: filetype=sh |