aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarkus Thömmes <markusthoemmes@me.com>2021-10-14 13:42:04 +0200
committerMarkus Thömmes <markusthoemmes@me.com>2021-10-14 13:54:52 +0200
commit184de3955ca8cb57e091a1b6006514aade885a59 (patch)
treedbab403eb29a0c74d11ec672b6163a1dc05d6d84 /test
parentcc875fd26848e74e4a70e9929c0e7e855a758970 (diff)
downloadpodman-184de3955ca8cb57e091a1b6006514aade885a59.tar.gz
podman-184de3955ca8cb57e091a1b6006514aade885a59.tar.bz2
podman-184de3955ca8cb57e091a1b6006514aade885a59.zip
Adjust tests to verify all subcommands show the help message
Signed-off-by: Markus Thömmes <markusthoemmes@me.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/001-basic.bats6
-rw-r--r--test/system/015-help.bats13
2 files changed, 10 insertions, 9 deletions
diff --git a/test/system/001-basic.bats b/test/system/001-basic.bats
index 2e5ebe4a3..2a6f4bea0 100644
--- a/test/system/001-basic.bats
+++ b/test/system/001-basic.bats
@@ -100,10 +100,8 @@ function setup() {
skip "only applicable on a local run since this requires no endpoint"
fi
- run_podman 125 --remote
- is "$output" "Error: missing command 'podman COMMAND'
-Try 'podman --help' for more information." \
- "podman --remote show usage message without running endpoint"
+ run_podman --remote
+ is "$output" ".*Usage:" "podman --remote show usage message without running endpoint"
}
# This is for development only; it's intended to make sure our timeout
diff --git a/test/system/015-help.bats b/test/system/015-help.bats
index 5f38c34a1..51660ba12 100644
--- a/test/system/015-help.bats
+++ b/test/system/015-help.bats
@@ -143,13 +143,16 @@ function check_help() {
count=$(expr $count + 1)
done
- # Any command that takes subcommands, must throw error if called
+ # Any command that takes subcommands, prints its help if called
# without one.
dprint "podman $@"
- run_podman '?' "$@"
- is "$status" 125 "'podman $*' without any subcommand - exit status"
- is "$output" "Error: missing command .*$@ COMMAND" \
- "'podman $*' without any subcommand - expected error message"
+
+ # Store the output of the actual --help command
+ run_podman "$@" --help
+ local full_help="$output"
+
+ run_podman "$@"
+ is "$output" "$full_help" "'podman $*' without any subcommand - expected help message"
# Assume that 'NoSuchCommand' is not a command
dprint "podman $@ NoSuchCommand"