mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
handle aliases for lookup and inventory plugins for authentication options (#500)
Honor aliases for lookup and inventory plugins rebase and extend the following PR #71 ISSUE TYPE Bugfix Pull Request Reviewed-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
@@ -160,3 +160,25 @@ def test_load_kube_config_from_dict():
|
||||
|
||||
assert expected_configuration.items() <= actual_configuration.__dict__.items()
|
||||
_remove_temp_file()
|
||||
|
||||
|
||||
def test_create_auth_spec_with_aliases_in_kwargs():
|
||||
auth_options = {
|
||||
"host": TEST_HOST,
|
||||
"cert_file": TEST_CLIENT_CERT,
|
||||
"ssl_ca_cert": TEST_CERTIFICATE_AUTH,
|
||||
"key_file": TEST_CLIENT_KEY,
|
||||
"verify_ssl": True,
|
||||
}
|
||||
|
||||
expected_auth_spec = {
|
||||
"host": TEST_HOST,
|
||||
"cert_file": TEST_CLIENT_CERT,
|
||||
"ssl_ca_cert": TEST_CERTIFICATE_AUTH,
|
||||
"key_file": TEST_CLIENT_KEY,
|
||||
"verify_ssl": True,
|
||||
}
|
||||
|
||||
actual_auth_spec = _create_auth_spec(module=None, **auth_options)
|
||||
for key, value in expected_auth_spec.items():
|
||||
assert value == actual_auth_spec.get(key)
|
||||
|
||||
Reference in New Issue
Block a user