Skip to content

Commit c996af0

Browse files
authored
tests(storage): normalize VPCSC configuration in systests (#9616)
1 parent e6ddd3b commit c996af0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/tests/system.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636

3737
from test_utils.retry import RetryErrors
3838
from test_utils.system import unique_resource_id
39+
from test_utils.vpcsc_config import vpcsc_config
3940

4041

4142
USER_PROJECT = os.environ.get("GOOGLE_CLOUD_TESTS_USER_PROJECT")
42-
RUNNING_IN_VPCSC = os.getenv("GOOGLE_CLOUD_TESTS_IN_VPCSC", "").lower() == "true"
4343

4444

4545
def _bad_copy(bad_request):
@@ -641,7 +641,7 @@ def test_upload_gzip_encoded_download_raw(self):
641641

642642

643643
class TestUnicode(unittest.TestCase):
644-
@unittest.skipIf(RUNNING_IN_VPCSC, "Test is not VPCSC compatible.")
644+
@vpcsc_config.skip_if_inside_vpcsc
645645
def test_fetch_object_and_check_content(self):
646646
client = storage.Client()
647647
bucket = client.bucket("storage-library-test-bucket")
@@ -1380,7 +1380,7 @@ class TestAnonymousClient(unittest.TestCase):
13801380

13811381
PUBLIC_BUCKET = "gcp-public-data-landsat"
13821382

1383-
@unittest.skipIf(RUNNING_IN_VPCSC, "Test is not VPCSC compatible.")
1383+
@vpcsc_config.skip_if_inside_vpcsc
13841384
def test_access_to_public_bucket(self):
13851385
anonymous = storage.Client.create_anonymous_client()
13861386
bucket = anonymous.bucket(self.PUBLIC_BUCKET)

0 commit comments

Comments
 (0)