Skip to content

Commit

Permalink
fixing the test for empty secret with new format
Browse files Browse the repository at this point in the history
  • Loading branch information
n3o-Bhushan committed May 7, 2024
1 parent 567c657 commit d4e7d9f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions zdatasets/tests/utils/test_secret_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ def test_fetch_aws_secret():
SecretFetcher(aws_secret_arn="not-json-decodable", key="key").value

# Empty string
with pytest.raises(ValueError):
SecretFetcher(aws_secret_arn="empty").value
with pytest.raises(ValueError) as ve:
SecretFetcher(aws_secret_arn="empty")
assert (
"Secrets Manager can't find the specified secret value for staging label: AWSCURRENT"
== ve.value.response["Error"]["Message"])


@mock.patch("zdatasets.utils.secret_fetcher.get_current_namespace")
Expand Down

0 comments on commit d4e7d9f

Please sign in to comment.