summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
Diffstat (limited to 'test/system')
-rw-r--r--test/system/015-help.bats14
-rw-r--r--test/system/250-systemd.bats3
2 files changed, 16 insertions, 1 deletions
diff --git a/test/system/015-help.bats b/test/system/015-help.bats
index 4a3781012..651fdcd09 100644
--- a/test/system/015-help.bats
+++ b/test/system/015-help.bats
@@ -86,6 +86,20 @@ function check_help() {
found[takes_no_args]=1
fi
+ # If command lists "-l, --latest" in help output, combine -l with arg.
+ # This should be disallowed with a clear message.
+ if expr "$full_help" : ".*-l, --latest" >/dev/null; then
+ local nope="exec list port ps top" # these can't be tested
+ if is_rootless; then
+ nope="$nope mount restore" # these don't work rootless
+ fi
+ if ! grep -wq "$cmd" <<<$nope; then
+ run_podman 125 "$@" $cmd -l nonexistent-container
+ is "$output" "Error: .*--latest and \(containers\|pods\|arguments\) cannot be used together" \
+ "'$command_string' with both -l and container"
+ fi
+ fi
+
# If usage has required arguments, try running without them.
# The expression here is 'first capital letter is not in [BRACKETS]'.
# It is intended to handle 'podman foo [flags] ARG' but not ' [ARG]'.
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats
index bbb5a10fb..9bd3e15a1 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -41,7 +41,8 @@ function teardown() {
fi
cname=$(random_string)
- run_podman create --name $cname --label "io.containers.autoupdate=image" --detach $IMAGE top
+ # See #7407 for --pull=always.
+ run_podman create --pull=always --name $cname --label "io.containers.autoupdate=image" --detach $IMAGE top
run_podman generate systemd --new $cname
echo "$output" > "$UNIT_FILE"