Add more integration tests for export collection

This commit is contained in:
Artsiom Musin 2022-11-09 22:18:02 +01:00
parent ac57f5cb28
commit 271613b86d

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: