Merge pull request #8152 from AlanCoding/import_fix

Fix AWX collection import test interference with Default organization

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-09-18 19:05:22 +00:00
committed by GitHub

View File

@@ -25,7 +25,7 @@
notification_templates_error: [] notification_templates_error: []
notification_templates_approvals: [] notification_templates_approvals: []
natural_key: natural_key:
name: "Default" name: "{{ org_name1 }}"
type: "organization" type: "organization"
register: import_output register: import_output
@@ -33,7 +33,7 @@
that: that:
- import_output is changed - import_output is changed
- name: "Import something again (awxkit is not idempotent, this tests a failure)" - name: "Import the same thing again"
tower_import: tower_import:
assets: assets:
organizations: organizations:
@@ -48,15 +48,15 @@
notification_templates_error: [] notification_templates_error: []
notification_templates_approvals: [] notification_templates_approvals: []
natural_key: natural_key:
name: "Default" name: "{{ org_name1 }}"
type: "organization" type: "organization"
register: import_output register: import_output
ignore_errors: true ignore_errors: true
- assert: - assert:
that: that:
- import_output is failed - import_output is not failed
- "'Organization with this Name already exists' in import_output.msg" # - import_output is not changed # FIXME: module not idempotent
- name: "Write out a json file" - name: "Write out a json file"
copy: copy:
@@ -76,7 +76,7 @@
"notification_templates_approvals": [] "notification_templates_approvals": []
}, },
"natural_key": { "natural_key": {
"name": "Default", "name": "{{ org_name2 }}",
"type": "organization" "type": "organization"
} }
} }