mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Last of the ad-hoc priv escalation unit test fixes
This commit is contained in:
parent
e8d010533f
commit
736f86fc72
@ -568,17 +568,10 @@ class AdHocCommandApiTest(BaseAdHocCommandTest):
|
||||
with self.current_user('admin'):
|
||||
response = self.post(url, data, expect=400)
|
||||
data.pop('forks')
|
||||
data['privilege_escalation'] = 'telekinesis'
|
||||
with self.current_user('admin'):
|
||||
response = self.post(url, data, expect=400)
|
||||
data['privilege_escalation'] = 'su'
|
||||
data['become_enabled'] = True
|
||||
with self.current_user('admin'):
|
||||
response = self.post(url, data, expect=201)
|
||||
self.assertEqual(response['privilege_escalation'], 'su')
|
||||
data['privilege_escalation'] = 'sudo'
|
||||
with self.current_user('admin'):
|
||||
response = self.post(url, data, expect=201)
|
||||
self.assertEqual(response['privilege_escalation'], 'sudo')
|
||||
self.assertEqual(response['become_enabled'], True)
|
||||
|
||||
def test_ad_hoc_command_detail(self):
|
||||
# Post to list to start a new ad hoc command.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user