diff --git a/tests/system/test__signing.py b/tests/system/test__signing.py index 72e392bde..04c3687a4 100644 --- a/tests/system/test__signing.py +++ b/tests/system/test__signing.py @@ -48,13 +48,15 @@ def _create_signed_list_blobs_url_helper( assert response.status_code == 200 -def test_create_signed_list_blobs_url_v2(storage_client, signing_bucket): +def test_create_signed_list_blobs_url_v2(storage_client, signing_bucket, no_mtls): _create_signed_list_blobs_url_helper( storage_client, signing_bucket, version="v2", ) -def test_create_signed_list_blobs_url_v2_w_expiration(storage_client, signing_bucket): +def test_create_signed_list_blobs_url_v2_w_expiration( + storage_client, signing_bucket, no_mtls +): now = datetime.datetime.utcnow() delta = datetime.timedelta(seconds=10) @@ -63,13 +65,15 @@ def test_create_signed_list_blobs_url_v2_w_expiration(storage_client, signing_bu ) -def test_create_signed_list_blobs_url_v4(storage_client, signing_bucket): +def test_create_signed_list_blobs_url_v4(storage_client, signing_bucket, no_mtls): _create_signed_list_blobs_url_helper( storage_client, signing_bucket, version="v4", ) -def test_create_signed_list_blobs_url_v4_w_expiration(storage_client, signing_bucket): +def test_create_signed_list_blobs_url_v4_w_expiration( + storage_client, signing_bucket, no_mtls +): now = datetime.datetime.utcnow() delta = datetime.timedelta(seconds=10) _create_signed_list_blobs_url_helper( @@ -125,17 +129,19 @@ def _create_signed_read_url_helper( assert response.content == _helpers.signing_blob_content -def test_create_signed_read_url_v2(storage_client, signing_bucket): +def test_create_signed_read_url_v2(storage_client, signing_bucket, no_mtls): _create_signed_read_url_helper(storage_client, signing_bucket) -def test_create_signed_read_url_v4(storage_client, signing_bucket): +def test_create_signed_read_url_v4(storage_client, signing_bucket, no_mtls): _create_signed_read_url_helper( storage_client, signing_bucket, version="v4", ) -def test_create_signed_read_url_v2_w_expiration(storage_client, signing_bucket): +def test_create_signed_read_url_v2_w_expiration( + storage_client, signing_bucket, no_mtls +): now = datetime.datetime.utcnow() delta = datetime.timedelta(seconds=10) @@ -144,7 +150,9 @@ def test_create_signed_read_url_v2_w_expiration(storage_client, signing_bucket): ) -def test_create_signed_read_url_v4_w_expiration(storage_client, signing_bucket): +def test_create_signed_read_url_v4_w_expiration( + storage_client, signing_bucket, no_mtls +): now = datetime.datetime.utcnow() delta = datetime.timedelta(seconds=10) _create_signed_read_url_helper( @@ -152,17 +160,23 @@ def test_create_signed_read_url_v4_w_expiration(storage_client, signing_bucket): ) -def test_create_signed_read_url_v2_lowercase_method(storage_client, signing_bucket): +def test_create_signed_read_url_v2_lowercase_method( + storage_client, signing_bucket, no_mtls +): _create_signed_read_url_helper(storage_client, signing_bucket, method="get") -def test_create_signed_read_url_v4_lowercase_method(storage_client, signing_bucket): +def test_create_signed_read_url_v4_lowercase_method( + storage_client, signing_bucket, no_mtls +): _create_signed_read_url_helper( storage_client, signing_bucket, method="get", version="v4" ) -def test_create_signed_read_url_v2_w_non_ascii_name(storage_client, signing_bucket): +def test_create_signed_read_url_v2_w_non_ascii_name( + storage_client, signing_bucket, no_mtls +): _create_signed_read_url_helper( storage_client, signing_bucket, @@ -171,7 +185,9 @@ def test_create_signed_read_url_v2_w_non_ascii_name(storage_client, signing_buck ) -def test_create_signed_read_url_v4_w_non_ascii_name(storage_client, signing_bucket): +def test_create_signed_read_url_v4_w_non_ascii_name( + storage_client, signing_bucket, no_mtls +): _create_signed_read_url_helper( storage_client, signing_bucket, @@ -181,7 +197,7 @@ def test_create_signed_read_url_v4_w_non_ascii_name(storage_client, signing_buck ) -def test_create_signed_read_url_v2_w_csek(storage_client, signing_bucket): +def test_create_signed_read_url_v2_w_csek(storage_client, signing_bucket, no_mtls): encryption_key = os.urandom(32) _create_signed_read_url_helper( storage_client, @@ -192,7 +208,7 @@ def test_create_signed_read_url_v2_w_csek(storage_client, signing_bucket): ) -def test_create_signed_read_url_v4_w_csek(storage_client, signing_bucket): +def test_create_signed_read_url_v4_w_csek(storage_client, signing_bucket, no_mtls): encryption_key = os.urandom(32) _create_signed_read_url_helper( storage_client, @@ -205,7 +221,7 @@ def test_create_signed_read_url_v4_w_csek(storage_client, signing_bucket): def test_create_signed_read_url_v2_w_access_token( - storage_client, signing_bucket, service_account, + storage_client, signing_bucket, service_account, no_mtls ): client = iam_credentials_v1.IAMCredentialsClient() service_account_email = service_account.service_account_email @@ -229,7 +245,7 @@ def test_create_signed_read_url_v2_w_access_token( def test_create_signed_read_url_v4_w_access_token( - storage_client, signing_bucket, service_account, + storage_client, signing_bucket, service_account, no_mtls ): client = iam_credentials_v1.IAMCredentialsClient() service_account_email = service_account.service_account_email @@ -270,11 +286,11 @@ def _create_signed_delete_url_helper(client, bucket, version="v2", expiration=No assert not blob.exists() -def test_create_signed_delete_url_v2(storage_client, signing_bucket): +def test_create_signed_delete_url_v2(storage_client, signing_bucket, no_mtls): _create_signed_delete_url_helper(storage_client, signing_bucket) -def test_create_signed_delete_url_v4(storage_client, signing_bucket): +def test_create_signed_delete_url_v4(storage_client, signing_bucket, no_mtls): _create_signed_delete_url_helper(storage_client, signing_bucket, version="v4") @@ -318,20 +334,20 @@ def _create_signed_resumable_upload_url_helper( assert delete_response.status_code == 204 -def test_create_signed_resumable_upload_url_v2(storage_client, signing_bucket): +def test_create_signed_resumable_upload_url_v2(storage_client, signing_bucket, no_mtls): _create_signed_resumable_upload_url_helper( storage_client, signing_bucket, version="v2", ) -def test_create_signed_resumable_upload_url_v4(storage_client, signing_bucket): +def test_create_signed_resumable_upload_url_v4(storage_client, signing_bucket, no_mtls): _create_signed_resumable_upload_url_helper( storage_client, signing_bucket, version="v4", ) def test_generate_signed_post_policy_v4( - storage_client, buckets_to_delete, blobs_to_delete, service_account, + storage_client, buckets_to_delete, blobs_to_delete, service_account, no_mtls ): bucket_name = _helpers.unique_name("post_policy") bucket = _helpers.retry_429_503(storage_client.create_bucket)(bucket_name) @@ -364,7 +380,7 @@ def test_generate_signed_post_policy_v4( def test_generate_signed_post_policy_v4_invalid_field( - storage_client, buckets_to_delete, blobs_to_delete, service_account, + storage_client, buckets_to_delete, blobs_to_delete, service_account, no_mtls ): bucket_name = _helpers.unique_name("post_policy-invalid") bucket = _helpers.retry_429_503(storage_client.create_bucket)(bucket_name)