Skip to content

Commit

Permalink
tests: unflake ud system test to only run in prod and hmac sample test (
Browse files Browse the repository at this point in the history
#1353)

* test: test universe domain client only in prod

* unflake hmac snippet test
  • Loading branch information
cojenco authored Sep 27, 2024
1 parent 7631643 commit bebd97a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion samples/snippets/hmac_samples_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def new_hmac_key():
if not hmac_key.state == "INACTIVE":
hmac_key.state = "INACTIVE"
hmac_key.update()
hmac_key.delete()
try:
hmac_key.delete()
except google.api_core.exceptions.BadRequest:
pass


def test_list_keys(capsys, new_hmac_key):
Expand Down
4 changes: 4 additions & 0 deletions tests/system/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ def test_download_blob_to_file_w_etag(
assert buffer.getvalue() == payload


@pytest.mark.skipif(
_helpers.is_api_endpoint_override,
reason="Credentials not yet supported in preprod testing.",
)
def test_client_universe_domain(
universe_domain_client,
test_universe_location,
Expand Down

0 comments on commit bebd97a

Please sign in to comment.