ansible/test/integration/targets/tower_label/tasks/main.yml
jainnikhil30 cd27982959 Fixing exception import for tower modules (#50447)
* 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
2019-01-09 15:31:21 +01:00

19 lines
475 B
YAML

- name: Create a Label
tower_label:
name: important
organization: Default
state: present
- name: Check module fails with correct msg
tower_label:
name: "Test Label"
organization: "Non existing org"
state: present
register: result
ignore_errors: true
- assert:
that:
- "result.msg == 'Failed to update label, organization not found: The requested object could not be found.'"
# TODO: Deleting labels doesn't seem to work currently