From f030c0967cb35b19151c03bc2d25a98e4b50f5a5 Mon Sep 17 00:00:00 2001 From: gurusai-voleti Date: Fri, 30 Jan 2026 14:41:32 +0000 Subject: [PATCH] chore: Migrate gsutil usage to gcloud storage --- tests/test_common.py | 4 ++-- tests/test_object.py | 8 ++++---- tests/test_proto2rest.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_common.py b/tests/test_common.py index 1983a8fc..673ab5a2 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -1071,7 +1071,7 @@ def test_enforce_patch_override_success(self): def test_crc32c_to_from_proto(self): # used an external tool to get the CRC32C of: # /bin/echo -n 'The quick brown fox jumps over the lazy dog' > fox.txt - # gsutil hash fox.txt + # gcloud storage hash fox.txt # it prints # Hash (crc32c): ImIEBA== # then use: @@ -1086,7 +1086,7 @@ def test_crc32c_to_from_proto(self): def test_md5_to_from_proto(self): # used an external tool to get the CRC32C of: # /bin/echo -n 'The quick brown fox jumps over the lazy dog' > fox.txt - # gsutil hash fox.txt + # gcloud storage hash fox.txt # it prints # Hash (md5): nhB9nTcrtoJr2B01QqQZ1g== # then use: diff --git a/tests/test_object.py b/tests/test_object.py index 3a44e405..88f3fee7 100644 --- a/tests/test_object.py +++ b/tests/test_object.py @@ -203,7 +203,7 @@ def test_init_multipart_inconsistent_content_type(self): self.assertEqual(rest.exception.code, 412) def test_init_multipart_inconsistent_md5(self): - # The magic string is the MD5 hash for an empty object, computed using `gsutil hash` + # The magic string is the MD5 hash for an empty object, computed using `gcloud storage hash` boundary, payload = format_multipart_upload( {"name": "object", "md5Hash": "1B2M2Y8AsgTpgAmY7PhCfg=="}, "How vexingly quick daft zebras jump!", @@ -219,7 +219,7 @@ def test_init_multipart_inconsistent_md5(self): self.assertEqual(rest.exception.code, 412) def test_init_multipart_inconsistent_crc32c(self): - # The magic string is the CRC32C checksum for an empty object, computed using `gsutil hash` + # The magic string is the CRC32C checksum for an empty object, computed using `gcloud storage hash` boundary, payload = format_multipart_upload( {"name": "object", "crc32c": "AAAAAA=="}, "How vexingly quick daft zebras jump!", @@ -241,7 +241,7 @@ def test_init_xml_md5hash(self): base_url="http://localhost:8080", content_type="text/plain", headers={ - # This MD5 hash was obtained using `gsutil hash` + # This MD5 hash was obtained using `gcloud storage hash` "x-goog-hash": "md5=nhB9nTcrtoJr2B01QqQZ1g==", }, content_length=len(media), @@ -260,7 +260,7 @@ def test_init_xml_crc32c(self): base_url="http://localhost:8080", content_type="text/plain", headers={ - # This CRC32C checksum was obtained using `gsutil hash` + # This CRC32C checksum was obtained using `gcloud storage hash` "x-goog-hash": "crc32c=ImIEBA==", }, content_length=len(media), diff --git a/tests/test_proto2rest.py b/tests/test_proto2rest.py index fe6786e5..d1f30054 100644 --- a/tests/test_proto2rest.py +++ b/tests/test_proto2rest.py @@ -85,7 +85,7 @@ def test_default_object_access_control_as_rest(self): def test_object_as_rest(self): media = b"The quick brown fox jumps over the lazy dog" - # These checksums can be obtained using `gsutil hash` + # These checksums can be obtained using `gcloud storage hash` crc32c = "ImIEBA==" md5 = "nhB9nTcrtoJr2B01QqQZ1g==" object = storage_pb2.Object(