Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
Signed-off-by: Gao Binlong <[email protected]>
  • Loading branch information
gaobinlong committed Oct 31, 2024
1 parent 0195c1d commit 216eebe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ grant {

// gcs client set Authenticator for proxy username/password
permission java.net.NetPermission "setDefaultAuthenticator";
permission java.io.FilePermission "/sys/class/dmi/id/product_name", "read";
};
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void testApplicationDefaultCredentialsWhenNoSettingProvided() throws Exce
Exception exception = assertThrows(IOException.class, GoogleCredentials::getApplicationDefault);
assertNotNull(storageOptions);
assertNull(storageOptions.getCredentials());
MatcherAssert.assertThat(exception.getMessage(), containsString("The Application Default Credentials are not available"));
MatcherAssert.assertThat(exception.getMessage(), containsString("Your default credentials were not found"));
}

/**
Expand All @@ -254,7 +254,7 @@ public void testDefaultCredentialsThrowsExceptionWithoutGCStorageService() {
GoogleCredentials credentials = googleApplicationDefaultCredentials.get();
assertNull(credentials);
Exception exception = assertThrows(IOException.class, GoogleCredentials::getApplicationDefault);
MatcherAssert.assertThat(exception.getMessage(), containsString("The Application Default Credentials are not available"));
MatcherAssert.assertThat(exception.getMessage(), containsString("Your default credentials were not found"));
}

/**
Expand Down

0 comments on commit 216eebe

Please sign in to comment.