Skip to content

Commit

Permalink
test(integrations): updated for new default max_batch_results value
Browse files Browse the repository at this point in the history
  • Loading branch information
kiran94 committed Jan 20, 2024
1 parent 1dc988e commit 44a9f24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/integrations/test_aws_secret_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_fetch_all_no_parameters(list_secrets_return: dict):
result = integration.fetch_all()

assert result == []
assert mock_secret_man.list_secrets.call_args_list == [call(MaxResults=3)]
assert mock_secret_man.list_secrets.call_args_list == [call(MaxResults=50)]


@pytest.mark.parametrize("max_results", [
Expand Down Expand Up @@ -48,7 +48,7 @@ def test_fetch_all__keys_no_pagination():
integration = AWSSecretManager(mock_secret_man)
result = integration.fetch_all()

assert mock_secret_man.list_secrets.call_args_list == [call(MaxResults=3)]
assert mock_secret_man.list_secrets.call_args_list == [call(MaxResults=50)]
assert result == [
SecretStoreItem(key='param1'),
SecretStoreItem(key='param2'),
Expand Down Expand Up @@ -87,7 +87,7 @@ def test_fetch_all_keys_pagination():
SecretStoreItem(key='param4')
]

assert mock_secret_man.list_secrets.call_args_list == [call(MaxResults=3), call(NextToken='token1', MaxResults=3), call(NextToken='token2', MaxResults=3)]
assert mock_secret_man.list_secrets.call_args_list == [call(MaxResults=50), call(NextToken='token1', MaxResults=50), call(NextToken='token2', MaxResults=50)]

def test_fetch_secrets():
input = ['param1']
Expand Down
6 changes: 3 additions & 3 deletions tests/integrations/test_aws_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_fetch_all_no_parameters(describe_parameters_return: dict):
result = integration.fetch_all()

assert result == []
assert mock_ssm.describe_parameters.call_args_list == [call(MaxResults=3)]
assert mock_ssm.describe_parameters.call_args_list == [call(MaxResults=50)]


@pytest.mark.parametrize("max_results", [
Expand Down Expand Up @@ -49,7 +49,7 @@ def test_fetch_all_ssm_keys_no_pagination():
integration = AWSParameterStore(mock_ssm)
result = integration.fetch_all()

assert mock_ssm.describe_parameters.call_args_list == [call(MaxResults=3)]
assert mock_ssm.describe_parameters.call_args_list == [call(MaxResults=50)]
assert result == [
SecretStoreItem(key='param1'),
SecretStoreItem(key='param2'),
Expand Down Expand Up @@ -88,7 +88,7 @@ def test_fetch_all_ssm_keys_pagination():
SecretStoreItem(key='param4')
]

assert mock_ssm.describe_parameters.call_args_list == [call(MaxResults=3), call(NextToken='token1', MaxResults=3), call(NextToken='token2', MaxResults=3)]
assert mock_ssm.describe_parameters.call_args_list == [call(MaxResults=50), call(NextToken='token1', MaxResults=50), call(NextToken='token2', MaxResults=50)]


def test_fetch_secrets():
Expand Down

0 comments on commit 44a9f24

Please sign in to comment.