This repository was archived by the owner on Apr 7, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141@ Category (SerialIntegrationTest .class )
4242@ RunWith (JUnit4 .class )
4343public class ITMutableCredentialsTest extends ITAbstractSpannerTest {
44+ private static final String VALID_KEY_RESOURCE =
45+ "/com/google/cloud/spanner/connection/test-key-cloud-storage.json" ;
46+
4447 private static final String INVALID_KEY_RESOURCE =
4548 "/com/google/cloud/spanner/connection/test-key.json" ;
4649
4750 @ Test
4851 public void testMutableCredentialsUpdateAuthorizationForRunningClient () throws IOException {
4952
5053 GoogleCredentials credentialsFromFile ;
51- try (InputStream stream = Files .newInputStream (Paths .get (getKeyFile ()))) {
54+ try (InputStream stream =
55+ Files .newInputStream (Paths .get (VALID_KEY_RESOURCE ))) {
5256 credentialsFromFile = GoogleCredentials .fromStream (stream );
5357 }
5458 assumeTrue (
@@ -57,8 +61,7 @@ public void testMutableCredentialsUpdateAuthorizationForRunningClient() throws I
5761
5862 ServiceAccountCredentials validCredentials = (ServiceAccountCredentials ) credentialsFromFile ;
5963 ServiceAccountCredentials invalidCredentials ;
60- try (InputStream stream =
61- ITMutableCredentialsTest .class .getResourceAsStream (INVALID_KEY_RESOURCE )) {
64+ try (InputStream stream = Files .newInputStream (Paths .get (INVALID_KEY_RESOURCE ))) {
6265 assertNotNull ("Missing test resource: " + INVALID_KEY_RESOURCE , stream );
6366 invalidCredentials = ServiceAccountCredentials .fromStream (stream );
6467 }
You can’t perform that action at this time.
0 commit comments