mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02:30
Allow EC2 inventory sources to omit a credential in order to use IAM roles. Implements https://trello.com/c/aBMF95eF
This commit is contained in:
@@ -1286,6 +1286,12 @@ class InventoryUpdatesTest(BaseTransactionTest):
|
||||
with self.current_user(self.super_django_user):
|
||||
response = self.put(inv_src_url1, inv_src_data, expect=200)
|
||||
self.assertEqual(response['source_regions'], '')
|
||||
# EC2 sources should allow an empty credential (to support IAM roles).
|
||||
inv_src_data['credential'] = None
|
||||
with self.current_user(self.super_django_user):
|
||||
response = self.put(inv_src_url1, inv_src_data, expect=200)
|
||||
self.assertEqual(response['credential'], None)
|
||||
inv_src_data['credential'] = aws_cred_id
|
||||
# Null for instance filters and group_by should be converted to empty
|
||||
# string.
|
||||
inv_src_data['instance_filters'] = None
|
||||
|
||||
Reference in New Issue
Block a user