aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-30 22:59:09 +0200
committerGitHub <noreply@github.com>2020-04-30 22:59:09 +0200
commit6803e72bf87e737663db054d971135bc06d0747f (patch)
tree7961d31eb3722d4329be65205c6f8c2400ff965a /test
parentc31bf2e97644b76163624149bb130528c6a5a394 (diff)
parent52371057cdd4084ac7c333d84b5f723029012855 (diff)
downloadpodman-6803e72bf87e737663db054d971135bc06d0747f.tar.gz
podman-6803e72bf87e737663db054d971135bc06d0747f.tar.bz2
podman-6803e72bf87e737663db054d971135bc06d0747f.zip
Merge pull request #6055 from baude/v2args
fix commands without input
Diffstat (limited to 'test')
-rw-r--r--test/system/015-help.bats21
1 files changed, 17 insertions, 4 deletions
diff --git a/test/system/015-help.bats b/test/system/015-help.bats
index fd4be87b2..6c3d617dc 100644
--- a/test/system/015-help.bats
+++ b/test/system/015-help.bats
@@ -55,11 +55,24 @@ function check_help() {
# If usage has required arguments, try running without them
if expr "$usage" : '.*\[flags\] [A-Z]' >/dev/null; then
- if [ "$cmd" != "stats"]; then
- dprint "podman $@ $cmd (without required args)"
- run_podman 125 "$@" $cmd
- is "$output" "Error:"
+ # Exceptions: these commands don't work rootless
+ if is_rootless; then
+ # "pause is not supported for rootless containers"
+ if [ "$cmd" = "pause" -o "$cmd" = "unpause" ]; then
+ continue
+ fi
+ # "network rm" too
+ if [ "$@" = "network" -a "$cmd" = "rm" ]; then
+ continue
+ fi
fi
+
+ # The </dev/null protects us from 'podman login' which will
+ # try to read username/password from stdin.
+ dprint "podman $@ $cmd (without required args)"
+ run_podman 125 "$@" $cmd </dev/null
+ is "$output" "Error:.* \(require\|specif\|must\|provide\|need\|choose\|accepts\)" \
+ "'podman $@ $cmd' without required arg"
fi
count=$(expr $count + 1)