summaryrefslogtreecommitdiff
path: root/test/integration/targets/tower_workflow_launch
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/tower_workflow_launch')
-rw-r--r--test/integration/targets/tower_workflow_launch/aliases2
-rw-r--r--test/integration/targets/tower_workflow_launch/files/tower_assets.json46
-rw-r--r--test/integration/targets/tower_workflow_launch/tasks/main.yml83
-rw-r--r--test/integration/targets/tower_workflow_launch/tests/validate.yml99
4 files changed, 0 insertions, 230 deletions
diff --git a/test/integration/targets/tower_workflow_launch/aliases b/test/integration/targets/tower_workflow_launch/aliases
deleted file mode 100644
index 229eebe6c9..0000000000
--- a/test/integration/targets/tower_workflow_launch/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-cloud/tower
-shippable/tower/group1
diff --git a/test/integration/targets/tower_workflow_launch/files/tower_assets.json b/test/integration/targets/tower_workflow_launch/files/tower_assets.json
deleted file mode 100644
index 4ebe8f8576..0000000000
--- a/test/integration/targets/tower_workflow_launch/files/tower_assets.json
+++ /dev/null
@@ -1,46 +0,0 @@
-[
- {
- "asset_relation": {
- "workflow_nodes": [
- {
- "name": "node0",
- "unified_job_type": "job",
- "success_nodes": [
- "node1"
- ],
- "failure_nodes": [],
- "unified_job_name": "Demo Job Template",
- "always_nodes": []
- },
- {
- "name": "node1",
- "unified_job_type": "job",
- "success_nodes": [],
- "failure_nodes": [],
- "unified_job_name": "Demo Job Template",
- "always_nodes": []
- }
- ],
- "roles": [
- {
- "team": [],
- "name": "Execute",
- "user": []
- },
- {
- "team": [],
- "name": "Admin",
- "user": []
- },
- {
- "team": [],
- "name": "Read",
- "user": []
- }
- ],
- "survey_spec": {}
- },
- "asset_type": "workflow",
- "name": "Success Workflow"
- },
-]
diff --git a/test/integration/targets/tower_workflow_launch/tasks/main.yml b/test/integration/targets/tower_workflow_launch/tasks/main.yml
deleted file mode 100644
index c4d791a931..0000000000
--- a/test/integration/targets/tower_workflow_launch/tasks/main.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-- name: Get unified job template ID for Demo Job Template"
- uri:
- url: "https://{{ tower_host }}/api/v2/unified_job_templates/?name=Demo+Job+Template"
- method: GET
- password: "{{ tower_password }}"
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
- register: unified_job
-
-- name: Build workflow
- uri:
- url: "https://{{ tower_host }}/api/v2/workflow_job_templates/"
- body:
- name: "Success Template"
- variables: "---"
- extra_vars: ""
- body_format: 'json'
- method: 'POST'
- password: "{{ tower_password }}"
- status_code: 201
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
- register: workflow
-
-- name: Add a node
- uri:
- url: "https://{{ tower_host }}/api/v2/workflow_job_templates/{{ workflow.json.id }}/workflow_nodes/"
- body:
- credential: null
- diff_mode: null
- extra_data: {}
- inventory: null
- job_tags: null
- job_type: null
- limit: null
- skip_tags: null
- unified_job_template: "{{ unified_job.json.results[0].id }}"
- verbosity: null
- body_format: 'json'
- method: 'POST'
- password: "{{ tower_password }}"
- status_code: 201
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
- register: node1
-
-- name: Add a node
- uri:
- url: "https://{{ tower_host }}/api/v2/workflow_job_templates/{{ workflow.json.id }}/workflow_nodes/"
- body:
- credential: null
- diff_mode: null
- extra_data: {}
- inventory: null
- job_tags: null
- job_type: null
- limit: null
- skip_tags: null
- unified_job_template: "{{ unified_job.json.results[0].id }}"
- verbosity: null
- body_format: 'json'
- method: 'POST'
- password: "{{ tower_password }}"
- status_code: 201
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
- register: node2
-
-- name: "Link nodes {{ node2.json.id }} to {{ node1.json.id }}"
- uri:
- url: "https://{{ tower_host }}/api/v2/workflow_job_template_nodes/{{ node1.json.id }}/success_nodes/"
- body: '{ "id": {{ node2.json.id }} }'
- body_format: 'json'
- method: 'POST'
- password: "{{ tower_password }}"
- status_code: 204
- user: "{{ tower_username }}"
- validate_certs: False
- force_basic_auth: true
diff --git a/test/integration/targets/tower_workflow_launch/tests/validate.yml b/test/integration/targets/tower_workflow_launch/tests/validate.yml
deleted file mode 100644
index e1bc593e83..0000000000
--- a/test/integration/targets/tower_workflow_launch/tests/validate.yml
+++ /dev/null
@@ -1,99 +0,0 @@
-- name: Run a workflow with no parameters
- tower_workflow_launch:
- validate_certs: False
- ignore_errors: true
- register: result1
-
-- assert:
- that:
- - result1.failed
- - "'missing required arguments' in result1.msg"
-
-- name: Fail no connect to Tower server
- tower_workflow_launch:
- tower_host: 127.0.0.1:22
- validate_certs: False
- workflow_template: "Here"
- ignore_errors: True
- register: result2
-
-- assert:
- that:
- - result2.failed
- - "'Failed to reach Tower' in result2.msg"
-
-- name: Connect to Tower server but request an invalid workflow
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Does Not Exist"
- ignore_errors: true
- register: result3
-
-- assert:
- that:
- - result3.failed
- - "'The requested object could not be found' in result3.msg"
-
-- name: Connect to Tower in check_mode with a valid workflow name
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Success Workflow"
- check_mode: True
- ignore_errors: true
- register: result4
-
-- assert:
- that:
- - not result4.failed
- - "'Check mode passed' in result4.msg"
-
-- name: Connect to Tower in check_mode with a valid workflow id
- tower_workflow_launch:
- validate_certs: False
- workflow_template: 9999999
- check_mode: True
- ignore_errors: true
- register: result5
-
-- assert:
- that:
- - result5.failed
- - "'The requested object could not be found' in result5.msg"
-
-- name: Run the workflow without waiting (this should just give us back a job ID)
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Success Workflow"
- wait: False
- ignore_errors: True
- register: result6
-
-- assert:
- that:
- - not result6.failed
- - "'id' in result6['job_info']"
-
-- name: Kick off a workflow and wait for it
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Success Workflow"
- ignore_errors: True
- register: result7
-
-- assert:
- that:
- - not result7.failed
- - "'id' in result7['job_info']"
-
-- name: Kick off a workflow and wait for it, but only for a second
- tower_workflow_launch:
- validate_certs: False
- workflow_template: "Success Workflow"
- timeout: 1
- ignore_errors: True
- register: result8
-
-- assert:
- that:
- - result8.failed
- - "'Monitoring aborted due to timeout' in result8.msg"