mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cd27982959
* fixing the exception import from tower modules * Adding tests for checking tower modules are failing with correct msg * fixed failing tests * fixed failing test in tower_team
34 lines
No EOL
732 B
YAML
34 lines
No EOL
732 B
YAML
- name: Create an Inventory
|
|
tower_inventory:
|
|
name: my-inventory
|
|
organization: Default
|
|
state: present
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result is changed"
|
|
|
|
- name: Delete an Inventory
|
|
tower_inventory:
|
|
name: my-inventory
|
|
organization: Default
|
|
state: absent
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result is changed"
|
|
|
|
- name: Check module fails with correct msg
|
|
tower_inventory:
|
|
name: test-inventory
|
|
description: Inventory Description
|
|
organization: test-non-existing-org
|
|
state: present
|
|
register: result
|
|
ignore_errors: true
|
|
|
|
- assert:
|
|
that:
|
|
- "result.msg =='Failed to update inventory, organization not found: The requested object could not be found.'" |