mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-14 04:48:35 -05:00
add the vault_id to the response payload on the JT launch endpoint
see: https://github.com/ansible/awx/issues/914
This commit is contained in:
@@ -403,6 +403,22 @@ def test_job_launch_fails_with_missing_multivault_password(machine_credential, v
|
||||
|
||||
url = reverse('api:job_template_launch', kwargs={'pk': deploy_jobtemplate.pk})
|
||||
resp = get(url, rando, expect=200)
|
||||
|
||||
assert {
|
||||
'credential_type': vault_cred_first.credential_type_id,
|
||||
'passwords_needed': ['vault_password.abc'],
|
||||
'vault_id': u'abc',
|
||||
'name': u'Vault #1',
|
||||
'id': vault_cred_first.id
|
||||
} in resp.data['defaults']['credentials']
|
||||
assert {
|
||||
'credential_type': vault_cred_second.credential_type_id,
|
||||
'passwords_needed': ['vault_password.xyz'],
|
||||
'vault_id': u'xyz',
|
||||
'name': u'Vault #2',
|
||||
'id': vault_cred_second.id
|
||||
} in resp.data['defaults']['credentials']
|
||||
|
||||
assert resp.data['passwords_needed_to_start'] == ['vault_password.abc', 'vault_password.xyz']
|
||||
assert sum([
|
||||
cred['passwords_needed'] for cred in resp.data['defaults']['credentials']
|
||||
|
||||
Reference in New Issue
Block a user