mirror of
https://github.com/ansible/awx.git
synced 2026-09-16 00:40:11 -02:30
Return 400 when attempting to relaunch an ad hoc command with deleted inventory. Fixes https://trello.com/c/IbvBelXJ
This commit is contained in:
@@ -719,6 +719,13 @@ class AdHocCommandApiTest(BaseAdHocCommandTest):
|
||||
self.patch(url, {}, expect=401)
|
||||
self.delete(url, expect=401)
|
||||
|
||||
# Try to relaunch after the inventory has been marked inactive.
|
||||
self.inventory.mark_inactive()
|
||||
with self.current_user('admin'):
|
||||
response = self.get(url, expect=200)
|
||||
self.assertEqual(response['passwords_needed_to_start'], [])
|
||||
response = self.post(url, {}, expect=400)
|
||||
|
||||
def test_ad_hoc_command_events_list(self):
|
||||
with self.current_user('admin'):
|
||||
response = self.run_test_ad_hoc_command()
|
||||
|
||||
Reference in New Issue
Block a user