mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
Add more integration tests for export collection
This commit is contained in:
@@ -61,6 +61,40 @@
|
|||||||
- mixed_export['assets']['organizations'] | length() == 1
|
- mixed_export['assets']['organizations'] | length() == 1
|
||||||
- "'workflow_job_templates' not in mixed_export['assets']"
|
- "'workflow_job_templates' not in mixed_export['assets']"
|
||||||
|
|
||||||
|
- name: Export list of organizations
|
||||||
|
export:
|
||||||
|
organizations: "{{[org_name1, org_name2]}}"
|
||||||
|
register: list_asserts
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- list_asserts is not changed
|
||||||
|
- list_asserts is successful
|
||||||
|
- list_asserts['assets']['organizations'] | length() >= 2
|
||||||
|
|
||||||
|
- name: Export list with one organization
|
||||||
|
export:
|
||||||
|
organizations: "{{[org_name1]}}"
|
||||||
|
register: list_asserts
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- list_asserts is not changed
|
||||||
|
- list_asserts is successful
|
||||||
|
- list_asserts['assets']['organizations'] | length() >= 1
|
||||||
|
- "org_name1 in (list_asserts['assets']['organizations'] | map(attribute='name') )"
|
||||||
|
|
||||||
|
- name: Export one organization as string
|
||||||
|
export:
|
||||||
|
organizations: "{{org_name2}}"
|
||||||
|
register: string_asserts
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- string_asserts is not changed
|
||||||
|
- string_asserts is successful
|
||||||
|
- string_asserts['assets']['organizations'] | length() >= 1
|
||||||
|
- "org_name2 in (string_asserts['assets']['organizations'] | map(attribute='name') )"
|
||||||
always:
|
always:
|
||||||
- name: Remove our inventory
|
- name: Remove our inventory
|
||||||
inventory:
|
inventory:
|
||||||
|
|||||||
Reference in New Issue
Block a user