Merge pull request #13168 from ArtsiomMusin/feature_13055_add_multiple_assert_export

Add multiple asset export for awx cli
This commit is contained in:
Jeff Bradberry
2022-11-30 15:01:42 -05:00
committed by GitHub
4 changed files with 89 additions and 39 deletions

View File

@@ -61,6 +61,40 @@
- mixed_export['assets']['organizations'] | length() == 1
- "'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:
- name: Remove our inventory
inventory: