From cf5d1a2d03eca2032343c8e706f744b2f146ec58 Mon Sep 17 00:00:00 2001 From: Benoit Bayszczak Date: Thu, 27 Aug 2020 11:06:14 +0200 Subject: [PATCH] restore previous tests as we need to keep backward compatibility This reverts commit 7c8e5ace5266f7943355a6aa03cbcd8956216ea7. --- .../test/awx/test_credential_input_source.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/awx_collection/test/awx/test_credential_input_source.py b/awx_collection/test/awx/test_credential_input_source.py index 2662f05c09..a676ab15cb 100644 --- a/awx_collection/test/awx/test_credential_input_source.py +++ b/awx_collection/test/awx/test_credential_input_source.py @@ -122,8 +122,7 @@ def source_cred_hashi_secret(organization): "url": "https://secret.hash.example.com", "token": "myApiKey", "role_id": "role", - "secret_id": "secret", - "auth_path": "/path/to/auth" + "secret_id": "secret" } ) @@ -143,7 +142,7 @@ def test_hashi_secret_credential_source(run_module, admin_user, organization, so source_credential=source_cred_hashi_secret.name, target_credential=tgt_cred.name, input_field_name='password', - metadata={"secret_path": "/path/to/secret", "secret_backend": "backend", "secret_key": "a_key"}, + metadata={"secret_path": "/path/to/secret", "auth_path": "/path/to/auth", "secret_backend": "backend", "secret_key": "a_key"}, state='present' ), admin_user) @@ -154,6 +153,7 @@ def test_hashi_secret_credential_source(run_module, admin_user, organization, so cis = CredentialInputSource.objects.first() assert cis.metadata['secret_path'] == "/path/to/secret" + assert cis.metadata['auth_path'] == "/path/to/auth" assert cis.metadata['secret_backend'] == "backend" assert cis.metadata['secret_key'] == "a_key" assert cis.source_credential.name == source_cred_hashi_secret.name @@ -188,14 +188,14 @@ def test_hashi_ssh_credential_source(run_module, admin_user, organization, sourc name='Test Machine Credential', organization=organization, credential_type=ct, - inputs={'username': 'bob', "auth_path": "/path/to/auth"} + inputs={'username': 'bob'} ) result = run_module('tower_credential_input_source', dict( source_credential=source_cred_hashi_ssh.name, target_credential=tgt_cred.name, input_field_name='password', - metadata={"secret_path": "/path/to/secret", "role": "role", "public_key": "a_key", "valid_principals": "some_value"}, + metadata={"secret_path": "/path/to/secret", "auth_path": "/path/to/auth", "role": "role", "public_key": "a_key", "valid_principals": "some_value"}, state='present' ), admin_user) @@ -206,6 +206,7 @@ def test_hashi_ssh_credential_source(run_module, admin_user, organization, sourc cis = CredentialInputSource.objects.first() assert cis.metadata['secret_path'] == "/path/to/secret" + assert cis.metadata['auth_path'] == "/path/to/auth" assert cis.metadata['role'] == "role" assert cis.metadata['public_key'] == "a_key" assert cis.metadata['valid_principals'] == "some_value"