Skip to content

Commit 080a4e7

Browse files
committed
feat: add unit test and resolve used undeclared dependencies warnings
1 parent 46dd160 commit 080a4e7

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

google-cloud-storage/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@
8787
<groupId>org.threeten</groupId>
8888
<artifactId>threetenbp</artifactId>
8989
</dependency>
90+
<dependency>
91+
<groupId> com.google.api.grpc</groupId>
92+
<artifactId>proto-google-cloud-iamcredentials-v1</artifactId>
93+
</dependency>
94+
<dependency>
95+
<groupId>com.google.code.gson</groupId>
96+
<artifactId>gson</artifactId>
97+
</dependency>
9098

9199
<!-- Test dependencies -->
92100
<dependency>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,15 @@ public void testDeleteDefaultAcl() throws Exception {
697697
assertTrue(bucket.deleteDefaultAcl(User.ofAllAuthenticatedUsers()));
698698
}
699699

700+
@Test
701+
public void testDisableLifeCycleRule() {
702+
expect(storage.getOptions()).andReturn(mockOptions).times(1);
703+
expect(storage.disableLifeCycleRule(BUCKET_INFO.getName(), "clientEmail")).andReturn(true);
704+
replay(storage);
705+
initializeBucket();
706+
assertTrue(bucket.disableLifeCycleRule(BUCKET_INFO.getName(), "clientEmail"));
707+
}
708+
700709
@Test
701710
public void testCreateDefaultAcl() throws Exception {
702711
initializeExpectedBucket(4);

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@
135135
<artifactId>guava</artifactId>
136136
<version>28.1-android</version>
137137
</dependency>
138+
<dependency>
139+
<groupId>com.google.code.gson</groupId>
140+
<artifactId>gson</artifactId>
141+
<version>2.8.6</version>
142+
<scope>compile</scope>
143+
</dependency>
138144

139145
<dependency>
140146
<groupId>org.checkerframework</groupId>
@@ -156,6 +162,12 @@
156162
<artifactId>google-cloud-iamcredentials</artifactId>
157163
<version>${google.iamcredentials.version}</version>
158164
</dependency>
165+
<dependency>
166+
<groupId> com.google.api.grpc</groupId>
167+
<artifactId>proto-google-cloud-iamcredentials-v1</artifactId>
168+
<version>${google.iamcredentials.version}</version>
169+
<scope>compile</scope>
170+
</dependency>
159171
<dependency>
160172
<groupId>com.google.protobuf</groupId>
161173
<artifactId>protobuf-java</artifactId>

0 commit comments

Comments
 (0)