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 INVALID_KEY_FILE =
45- ITMutableCredentialsTest . class . getResource ( " test-key.json"). getPath () ;
44+ private static final String INVALID_KEY_RESOURCE =
45+ "/com/google/cloud/spanner/connection/ test-key.json" ;
4646
4747 @ Test
4848 public void testMutableCredentialsUpdateAuthorizationForRunningClient () throws IOException {
@@ -58,7 +58,8 @@ public void testMutableCredentialsUpdateAuthorizationForRunningClient() throws I
5858
5959 ServiceAccountCredentials validCredentials = (ServiceAccountCredentials ) credentialsFromFile ;
6060 ServiceAccountCredentials invalidCredentials ;
61- try (InputStream stream = Files .newInputStream (Paths .get (INVALID_KEY_FILE ))) {
61+ try (InputStream stream = ITMutableCredentialsTest .class .getResourceAsStream (INVALID_KEY_RESOURCE )) {
62+ assertNotNull ("Missing test resource: " + INVALID_KEY_RESOURCE , stream );
6263 invalidCredentials = ServiceAccountCredentials .fromStream (stream );
6364 }
6465
You can’t perform that action at this time.
0 commit comments