Skip to content

Commit 15bfd91

Browse files
committed
Fix unit tests for emulator
1 parent 29ccf97 commit 15bfd91

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

google/cloud/storage/emulator/tests/test_holder.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ def test_init_resumable_grpc(self):
195195
insert_object_spec=insert_object_spec, write_offset=0
196196
)
197197
upload = gcs.holder.DataHolder.init_resumable_grpc(request, bucket, "")
198+
# Verify the annotations inserted by the emulator.
199+
annotations = upload.metadata.metadata
200+
self.assertGreaterEqual(
201+
set(["x_emulator_upload", "x_emulator_crc32c", "x_emulator_md5"]),
202+
set(annotations.keys()),
203+
)
204+
# Clear any annotations created by the emulator
205+
upload.metadata.metadata.clear()
198206
self.assertEqual(
199207
upload.metadata, resources_pb2.Object(name="object", bucket="bucket")
200208
)

0 commit comments

Comments
 (0)