summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/retry_task_name_in_callback
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/retry_task_name_in_callback')
-rw-r--r--test/integration/targets/retry_task_name_in_callback/aliases2
-rwxr-xr-xtest/integration/targets/retry_task_name_in_callback/runme.sh13
-rw-r--r--test/integration/targets/retry_task_name_in_callback/test.yml28
3 files changed, 43 insertions, 0 deletions
diff --git a/test/integration/targets/retry_task_name_in_callback/aliases b/test/integration/targets/retry_task_name_in_callback/aliases
new file mode 100644
index 0000000..1d28bdb
--- /dev/null
+++ b/test/integration/targets/retry_task_name_in_callback/aliases
@@ -0,0 +1,2 @@
+shippable/posix/group5
+context/controller
diff --git a/test/integration/targets/retry_task_name_in_callback/runme.sh b/test/integration/targets/retry_task_name_in_callback/runme.sh
new file mode 100755
index 0000000..5f636cd
--- /dev/null
+++ b/test/integration/targets/retry_task_name_in_callback/runme.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+set -eux
+
+# we are looking to verify the callback for v2_retry_runner gets a correct task name, include
+# if the value needs templating based on results of previous tasks
+OUTFILE="callback_retry_task_name.out"
+trap 'rm -rf "${OUTFILE}"' EXIT
+
+EXPECTED_REGEX="^.*TASK.*18236 callback task template fix OUTPUT 2"
+ansible-playbook "$@" -i ../../inventory test.yml | tee "${OUTFILE}"
+echo "Grepping for ${EXPECTED_REGEX} in stdout."
+grep -e "${EXPECTED_REGEX}" "${OUTFILE}"
diff --git a/test/integration/targets/retry_task_name_in_callback/test.yml b/test/integration/targets/retry_task_name_in_callback/test.yml
new file mode 100644
index 0000000..0e450cf
--- /dev/null
+++ b/test/integration/targets/retry_task_name_in_callback/test.yml
@@ -0,0 +1,28 @@
+---
+- hosts: testhost
+ gather_facts: False
+ vars:
+ foo: blippy
+ tasks:
+ - name: First run {{ foo }}
+ command: echo "18236 callback task template fix OUTPUT 1"
+ register: the_result_var
+
+ - block:
+ - name: "{{ the_result_var.stdout }}"
+ command: echo "18236 callback task template fix OUTPUT 2"
+ register: the_result_var
+ retries: 1
+ delay: 1
+ until: False
+ ignore_errors: true
+
+ # - name: assert task_name was
+
+ - name: "{{ the_result_var.stdout }}"
+ command: echo "18236 callback taskadfadf template fix OUTPUT 3"
+ register: the_result_var
+
+ - name: "{{ the_result_var.stdout }}"
+ debug:
+ msg: "nothing to see here."