mirror of
https://github.com/ansible/awx.git
synced 2026-03-05 02:31:03 -03:30
Merge pull request #10209 from beeankha/fix_integration_tests
Fix failing integration test playbooks SUMMARY Addressing issue #10104 ISSUE TYPE Bugfix Pull Request COMPONENT NAME Collections Reviewed-by: Seth Foster <None> Reviewed-by: Alan Rominger <arominge@redhat.com>
This commit is contained in:
@@ -232,7 +232,7 @@ class TowerAPIModule(TowerModule):
|
|||||||
# A 405 means we used a method that isn't allowed. Usually this is a bad request, but it requires special treatment because the
|
# A 405 means we used a method that isn't allowed. Usually this is a bad request, but it requires special treatment because the
|
||||||
# API sends it as a logic error in a few situations (e.g. trying to cancel a job that isn't running).
|
# API sends it as a logic error in a few situations (e.g. trying to cancel a job that isn't running).
|
||||||
elif he.code == 405:
|
elif he.code == 405:
|
||||||
self.fail_json(msg="The Tower server says you can't make a request with the {0} method to this endpoing {1}".format(method, url.path))
|
self.fail_json(msg="The Tower server says you can't make a request with the {0} method to this endpoint {1}".format(method, url.path))
|
||||||
# Sanity check: Did we get some other kind of error? If so, write an appropriate error message.
|
# Sanity check: Did we get some other kind of error? If so, write an appropriate error message.
|
||||||
elif he.code >= 400:
|
elif he.code >= 400:
|
||||||
# We are going to return a 400 so the module can decide what to do with it
|
# We are going to return a 400 so the module can decide what to do with it
|
||||||
|
|||||||
@@ -63,10 +63,11 @@
|
|||||||
command_id: "{{ command.id }}"
|
command_id: "{{ command.id }}"
|
||||||
fail_if_not_running: true
|
fail_if_not_running: true
|
||||||
register: results
|
register: results
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- results is changed
|
- results is failed
|
||||||
|
|
||||||
- name: Cancel an already canceled command (assert failure)
|
- name: Cancel an already canceled command (assert failure)
|
||||||
tower_ad_hoc_command_cancel:
|
tower_ad_hoc_command_cancel:
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
tower_instance_group:
|
tower_instance_group:
|
||||||
name: "{{ group_name2 }}"
|
name: "{{ group_name2 }}"
|
||||||
credential: "{{ cred_result.id }}"
|
credential: "{{ cred_result.id }}"
|
||||||
|
is_container_group: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|||||||
Reference in New Issue
Block a user