Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro committed Apr 4, 2024
1 parent 052d4da commit c17f00f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/providers/hashicorp/_internal_client/test_vault_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def test_aws_iam(self, mock_hvac):
access_key="user",
secret_key="pass",
role="role",
mount_point=None,
)
client.is_authenticated.assert_called_with()
assert 2 == vault_client.kv_engine_version
Expand All @@ -148,14 +149,7 @@ def test_aws_iam_different_auth_mount_point(self, mock_hvac):
client = vault_client.client
mock_hvac.Client.assert_called_with(url="http://localhost:8180", session=None)
client.auth.aws.iam_login.assert_called_with(
access_key="user",
secret_key="pass",
session_token=None,
header_value=None,
role="role",
use_token=True,
region="us-east-1",
mount_point="other",
access_key="user", secret_key="pass", role="role", mount_point="other"
)
client.is_authenticated.assert_called_with()
assert 2 == vault_client.kv_engine_version
Expand Down
3 changes: 3 additions & 0 deletions tests/providers/hashicorp/hooks/test_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ def test_aws_iam_init_params(self, mock_hvac, mock_get_connection):
access_key="user",
secret_key="pass",
role="role",
mount_point=None,
)
test_client.is_authenticated.assert_called_with()
assert 2 == test_hook.vault_client.kv_engine_version
Expand Down Expand Up @@ -343,6 +344,7 @@ def test_aws_iam_dejson(self, mock_hvac, mock_get_connection):
access_key="user",
secret_key="pass",
role="role",
mount_point=None,
)

@mock.patch("airflow.providers.hashicorp._internal_client.vault_client.hvac")
Expand All @@ -358,6 +360,7 @@ def test_aws_uri(self, mock_hvac):
access_key="login",
secret_key="pass",
role="role",
mount_point=None,
)
test_client.is_authenticated.assert_called_with()
assert 2 == test_hook.vault_client.kv_engine_version
Expand Down

0 comments on commit c17f00f

Please sign in to comment.