Skip to content

Commit

Permalink
feat: add unit test and resolve used undeclared dependencies warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
athakor committed Jan 6, 2020
1 parent fd3e819 commit 78ca9a4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions google-cloud-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
</dependency>
<dependency>
<groupId> com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-iamcredentials-v1</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,15 @@ public void testDeleteDefaultAcl() throws Exception {
assertTrue(bucket.deleteDefaultAcl(User.ofAllAuthenticatedUsers()));
}

@Test
public void testDisableLifeCycleRule() {
expect(storage.getOptions()).andReturn(mockOptions).times(1);
expect(storage.disableLifeCycleRule(BUCKET_INFO.getName(), "clientEmail")).andReturn(true);
replay(storage);
initializeBucket();
assertTrue(bucket.disableLifeCycleRule(BUCKET_INFO.getName(), "clientEmail"));
}

@Test
public void testCreateDefaultAcl() throws Exception {
initializeExpectedBucket(4);
Expand Down
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@
<artifactId>guava</artifactId>
<version>28.1-android</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.checkerframework</groupId>
Expand All @@ -156,6 +162,12 @@
<artifactId>google-cloud-iamcredentials</artifactId>
<version>${google.iamcredentials.version}</version>
</dependency>
<dependency>
<groupId> com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-iamcredentials-v1</artifactId>
<version>${google.iamcredentials.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
Expand Down

0 comments on commit 78ca9a4

Please sign in to comment.