diff --git a/awx_collection/tests/integration/targets/export/tasks/main.yml b/awx_collection/tests/integration/targets/export/tasks/main.yml index d051b3ee68..baa78ce64a 100644 --- a/awx_collection/tests/integration/targets/export/tasks/main.yml +++ b/awx_collection/tests/integration/targets/export/tasks/main.yml @@ -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: