From f8a23f20aa00c9ebb332cc26990c16b47b4814f2 Mon Sep 17 00:00:00 2001 From: Caleb Boylan Date: Tue, 21 Apr 2020 10:08:29 -0700 Subject: [PATCH] Collection: Assert tower_project job is successful --- .../targets/tower_project/tasks/main.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/awx_collection/tests/integration/targets/tower_project/tasks/main.yml b/awx_collection/tests/integration/targets/tower_project/tasks/main.yml index dd8c0b5d96..cece78acd5 100644 --- a/awx_collection/tests/integration/targets/tower_project/tasks/main.yml +++ b/awx_collection/tests/integration/targets/tower_project/tasks/main.yml @@ -127,7 +127,7 @@ scm_type: git scm_branch: empty_branch scm_url: https://github.com/ansible/test-playbooks - scm_allow_override: true + allow_override: true register: result - assert: @@ -151,9 +151,14 @@ that: - result is changed -- name: wait for "{{ result.id }}" +- name: "wait for job {{ result.id }}" tower_job_wait: job_id: "{{ result.id }}" + register: job + +- assert: + that: + - job is successful - name: Delete the test job_template tower_job_template: @@ -162,13 +167,13 @@ inventory: "Demo Inventory" state: absent -- name: Delete the test project +- name: Delete the test project 3 tower_project: name: "{{ project_name3 }}" organization: Default state: absent -- name: Delete the test project +- name: Delete the test project 2 tower_project: name: "{{ project_name2 }}" organization: "{{ org_name }}" @@ -186,7 +191,7 @@ that: - result is changed -- name: Delete the other test project +- name: Delete the test project 1 tower_project: name: "{{ project_name1 }}" organization: Default