From 6403895eae1c378d4eff774bb903254afbe99ee4 Mon Sep 17 00:00:00 2001 From: John Westcott IV Date: Wed, 8 Apr 2020 09:29:23 -0400 Subject: [PATCH] Puting tasks back to natural order --- .../tower_workflow_launch/tasks/main.yml | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/awx_collection/tests/integration/targets/tower_workflow_launch/tasks/main.yml b/awx_collection/tests/integration/targets/tower_workflow_launch/tasks/main.yml index 929f000c75..459ac813cb 100644 --- a/awx_collection/tests/integration/targets/tower_workflow_launch/tasks/main.yml +++ b/awx_collection/tests/integration/targets/tower_workflow_launch/tasks/main.yml @@ -6,12 +6,7 @@ - name: Generate names set_fact: - wfjt_name1: "Testing Workflow Job Launch" #"AWX-Collection-tests-tower_workflow_launch--wfjt1-{{ test_id }}" - -- name: Clean up test workflow from any previous runs - tower_workflow_job_template: - name: "{{ wfjt_name1 }}" - state: absent + wfjt_name1: "AWX-Collection-tests-tower_workflow_launch--wfjt1-{{ test_id }}" - name: Create our workflow tower_workflow_job_template: @@ -50,18 +45,6 @@ - result is not failed - "'id' in result['job_info']" -- name: Kick off a workflow and wait for it - tower_workflow_launch: - validate_certs: false - workflow_template: "{{ wfjt_name1 }}" - ignore_errors: true - register: result - -- assert: - that: - - result is not failed - - "'id' in result['job_info']" - - name: Kick off a workflow and wait for it, but only for a second tower_workflow_launch: validate_certs: false @@ -74,3 +57,21 @@ that: - result is failed - "'Monitoring aborted due to timeout' in result.msg" + +- name: Kick off a workflow and wait for it + tower_workflow_launch: + validate_certs: false + workflow_template: "{{ wfjt_name1 }}" + ignore_errors: true + register: result + +- assert: + that: + - result is not failed + - "'id' in result['job_info']" + +- name: Clean up test workflow + tower_workflow_job_template: + name: "{{ wfjt_name1 }}" + state: absent +