Skip to content

Commit 300c604

Browse files
committed
feat: implement getNotification inside StorageRpcTestBase class and fix the builds checks
1 parent 1947152 commit 300c604

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/testing/StorageRpcTestBase.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ public Notification createNotification(String bucket, Notification notification)
280280
throw new UnsupportedOperationException("Not implemented yet");
281281
}
282282

283+
@Override
284+
public Notification getNotification(String bucket, String notification) {
285+
throw new UnsupportedOperationException("Not implemented yet");
286+
}
287+
283288
@Override
284289
public Bucket lockRetentionPolicy(Bucket bucket, Map<Option, ?> options) {
285290
throw new UnsupportedOperationException("Not implemented yet");

google-cloud-storage/src/test/java/com/google/cloud/storage/StorageImplTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
import com.google.common.collect.ImmutableMap;
5858
import com.google.common.collect.Iterables;
5959
import com.google.common.io.BaseEncoding;
60-
import java.io.ByteArrayInputStream;
6160
import java.io.IOException;
6261
import java.io.UnsupportedEncodingException;
6362
import java.net.MalformedURLException;
@@ -2558,6 +2557,6 @@ private void compareBucketsNotification(Notification value) {
25582557
assertEquals(EVENT_TYPES, value.getEventTypes());
25592558
assertEquals(OBJECT_NAME_PREFIX, value.getObjectNamePrefix());
25602559
assertEquals(PAYLOAD_FORMAT.name(), value.getPayloadFormat());
2561-
assertEquals(TOPIC.toString(), value.getTopic());
2560+
assertEquals(TOPIC, value.getTopic());
25622561
}
25632562
}

google-cloud-storage/src/test/java/com/google/cloud/storage/testing/StorageRpcTestBaseTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,17 @@ public Notification call() {
577577
};
578578
}
579579

580+
@Test
581+
public void testGetNotification() {
582+
rpc =
583+
new Callable<Notification>() {
584+
@Override
585+
public Notification call() {
586+
return STORAGE_RPC.getNotification("bucket", "notification");
587+
}
588+
};
589+
}
590+
580591
@Test
581592
public void testLockRetentionPolicy() {
582593
rpc =

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<dependency>
8484
<groupId>com.google.cloud</groupId>
8585
<artifactId>google-cloud-pubsub</artifactId>
86-
<version>1.105.0</version>
86+
<version>1.106.0</version>
8787
<scope>test</scope>
8888
</dependency>
8989
<dependency>

0 commit comments

Comments
 (0)