summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorAbhijeet Kasurde <akasurde@redhat.com>2023-08-25 19:27:26 +0200
committerGitHub <noreply@github.com>2023-08-25 19:27:26 +0200
commitda63f32d59fe882bc77532e734af7348b65cb6cb (patch)
treeb725eeed10e56e9cbd3caf6b40306174ceec1716 /test/integration
parentfind: correct typo (#81512) (diff)
downloadansible-da63f32d59fe882bc77532e734af7348b65cb6cb.tar.xz
ansible-da63f32d59fe882bc77532e734af7348b65cb6cb.zip
script: add argument validation (#81469)
partially fixes: #81349 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/targets/script/tasks/main.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/integration/targets/script/tasks/main.yml b/test/integration/targets/script/tasks/main.yml
index 989513d531..8720ae020b 100644
--- a/test/integration/targets/script/tasks/main.yml
+++ b/test/integration/targets/script/tasks/main.yml
@@ -37,6 +37,17 @@
## script
##
+- name: Required one of free-form and cmd
+ script:
+ ignore_errors: yes
+ register: script_required
+
+- name: assert that the script fails if neither free-form nor cmd is given
+ assert:
+ that:
+ - script_required.failed
+ - "'one of the following' in script_required.msg"
+
- name: execute the test.sh script via command
script: test.sh
register: script_result0