forked from ansible/test-playbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tower_collection_smoke.j2
39 lines (32 loc) · 878 Bytes
/
tower_collection_smoke.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- name: Launch a Job Template
{{ collection_id }}.tower_job_launch:
job_template: "Demo Job Template"
register: job
- assert:
that:
- "job is changed"
- "job.status == 'pending'"
- name: List jobs w/ a matching primary key
{{ collection_id }}.tower_job_list:
query:
id: "{{ '{{' }} job.id {{ '}}' }}"
register: matching_jobs
- assert:
that:
- "{{ '{{' }} matching_jobs.count {{ '}}' }} == 1"
- name: List failed jobs (which don't exist)
{{ collection_id }}.tower_job_list:
status: failed
query:
id: "{{ '{{' }} job.id {{ '}}' }}"
register: successful_jobs
- assert:
that:
- "{{ '{{' }} successful_jobs.count {{ '}}' }} == 0"
- name: Get ALL result pages!
{{ collection_id }}.tower_job_list:
all_pages: True
register: all_page_query
- assert:
that:
- 'not all_page_query.next'