Fix inv source org lookup, adjust unit tests (since org is now required for inv source module), update README, edit typos in test-related README

This commit is contained in:
beeankha
2020-09-02 22:05:25 -04:00
parent b78dea3e4b
commit 7764f1c1a5
7 changed files with 75 additions and 67 deletions

View File

@@ -31,6 +31,7 @@
credential: "{{ openstack_cred }}"
overwrite: true
update_on_launch: true
organization: Default
source_vars:
private: false
source: openstack
@@ -47,6 +48,7 @@
credential: "Does Not Exit"
source_project: "Does Not Exist"
source_script: "Does Not Exist"
organization: Default
state: absent
- assert:

View File

@@ -32,12 +32,11 @@
name: "{{ inv_name }}"
organization: "{{ org_name }}"
state: present
register: created_inventory
- name: Create another inventory w/ same name
tower_inventory:
name: "{{ inv_name }}"
organization: "{{ org_name }}"
organization: Default
state: present
register: created_inventory
@@ -64,7 +63,7 @@
- name: Test Inventory Source Update
tower_inventory_source_update:
inventory: "{{ inv_name }}"
inventory_source: "{{ inv_source1 }}"
inventory_source: "{{ inv_source2 }}"
organization: Default
register: result
@@ -75,10 +74,12 @@
- name: Test Inventory Source Update for All Sources
tower_inventory_source_update:
inventory: "{{ inv_name }}"
inventory_source: "{{ item }}"
organization: "{{ created_org.id }}"
inventory_source: "{{ item.name }}"
organization: Default
wait: true
loop: "{{ query('awx.awx.tower_api', 'inventory_sources', query_params={ 'inventory': created_inventory.id }, return_ids=True ) }}"
loop: "{{ query('awx.awx.tower_api', 'inventory_sources', query_params={ 'inventory': created_inventory.id }, expect_objects=True, return_objects=True) }}"
loop_control:
label: "{{ item.name }}"
register: result
- assert: