summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/playbook
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/playbook')
-rw-r--r--test/integration/targets/playbook/aliases1
-rwxr-xr-xtest/integration/targets/playbook/runme.sh9
-rw-r--r--test/integration/targets/playbook/timeout.yml12
-rw-r--r--test/integration/targets/playbook/types.yml21
4 files changed, 43 insertions, 0 deletions
diff --git a/test/integration/targets/playbook/aliases b/test/integration/targets/playbook/aliases
new file mode 100644
index 00000000..a6dafcf8
--- /dev/null
+++ b/test/integration/targets/playbook/aliases
@@ -0,0 +1 @@
+shippable/posix/group1
diff --git a/test/integration/targets/playbook/runme.sh b/test/integration/targets/playbook/runme.sh
new file mode 100755
index 00000000..25e2e5a6
--- /dev/null
+++ b/test/integration/targets/playbook/runme.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+set -eux
+
+# run type tests
+ansible-playbook -i ../../inventory types.yml -v "$@"
+
+# test timeout
+ansible-playbook -i ../../inventory timeout.yml -v "$@"
diff --git a/test/integration/targets/playbook/timeout.yml b/test/integration/targets/playbook/timeout.yml
new file mode 100644
index 00000000..442e13ae
--- /dev/null
+++ b/test/integration/targets/playbook/timeout.yml
@@ -0,0 +1,12 @@
+- hosts: localhost
+ gather_facts: false
+ tasks:
+ - shell: sleep 100
+ timeout: 1
+ ignore_errors: true
+ register: time
+
+ - assert:
+ that:
+ - time is failed
+ - '"The shell action failed to execute in the expected time frame" in time["msg"]'
diff --git a/test/integration/targets/playbook/types.yml b/test/integration/targets/playbook/types.yml
new file mode 100644
index 00000000..dd8997b6
--- /dev/null
+++ b/test/integration/targets/playbook/types.yml
@@ -0,0 +1,21 @@
+- hosts: testhost
+ gather_facts: false
+ tasks:
+ - name: try to set 'diff' a boolean
+ debug: msg="not important"
+ diff: yes
+ ignore_errors: True
+ register: good_diff
+
+ - name: try to set 'diff' a boolean to a string (. would make it non boolean)
+ debug: msg="not important"
+ diff: yes.
+ ignore_errors: True
+ register: bad_diff
+
+ - name: Check we did error out
+ assert:
+ that:
+ - good_diff is success
+ - bad_diff is failed
+ - "'is not a valid boolean' in bad_diff['msg']"