From 207abd110ac2e1854804332025e6ea7806df1785 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Tue, 8 Oct 2024 11:48:57 -0400 Subject: [PATCH] fix: plumb list blobs match glob option for grpc transport (#2759) --- .../src/main/java/com/google/cloud/storage/UnifiedOpts.java | 3 +-- .../test/java/com/google/cloud/storage/it/ITObjectTest.java | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/UnifiedOpts.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/UnifiedOpts.java index bcc987ea75..043c52dd55 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/UnifiedOpts.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/UnifiedOpts.java @@ -1228,8 +1228,7 @@ private MatchGlob(String val) { @Override public Mapper listObjects() { - return CrossTransportUtils.throwHttpJsonOnly( - com.google.cloud.storage.Storage.BlobListOption.class, "matchGlob(String)"); + return b -> b.setMatchGlobBytes(ByteString.copyFromUtf8(val)); } } diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java index 99ed548098..7a88da5e48 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java @@ -563,7 +563,6 @@ public void testListBlobsCurrentDirectoryIncludesBothObjectsAndSyntheticDirector @Test // When gRPC support is added for matchGlob, enable this test for gRPC. - @Exclude(transports = Transport.GRPC) public void testListBlobsWithMatchGlob() throws Exception { BucketInfo bucketInfo = BucketInfo.newBuilder(generator.randomBucketName()).build(); try (TemporaryBucket tempBucket =