@@ -71,8 +71,7 @@ class GoogleCredentialsTest extends BaseSerializationTest {
7171 private static final String SA_PRIVATE_KEY_ID = "d84a4fefcf50791d4a90f2d7af17469d6282df9d" ;
7272 private static final String SA_PRIVATE_KEY_PKCS8 =
7373 ServiceAccountCredentialsTest .PRIVATE_KEY_PKCS8 ;
74- private static final String GDCH_SA_FORMAT_VERSION =
75- GdchCredentials .SUPPORTED_JSON_FORMAT_VERSION ;
74+
7675 private static final String GDCH_SA_PROJECT_ID = "gdch-service-account-project-id" ;
7776 private static final String GDCH_SA_PRIVATE_KEY_ID = "d84a4fefcf50791d4a90f2d7af17469d6282df9d" ;
7877 private static final String GDCH_SA_PRIVATE_KEY_PKC8 = GdchCredentialsTest .PRIVATE_KEY_PKCS8 ;
@@ -245,7 +244,7 @@ void fromStream_gdchServiceAccount_correct() throws IOException {
245244 MockTokenServerTransportFactory transportFactory = new MockTokenServerTransportFactory ();
246245 InputStream gdchServiceAccountStream =
247246 GdchCredentialsTest .writeGdchServiceAccountStream (
248- GDCH_SA_FORMAT_VERSION ,
247+ GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ,
249248 GDCH_SA_PROJECT_ID ,
250249 GDCH_SA_PRIVATE_KEY_ID ,
251250 GDCH_SA_PRIVATE_KEY_PKC8 ,
@@ -295,7 +294,7 @@ void fromStream_gdchServiceAccountNoFormatVersion_throws() throws IOException {
295294 void fromStream_gdchServiceAccountNoProjectId_throws () throws IOException {
296295 InputStream gdchServiceAccountStream =
297296 GdchCredentialsTest .writeGdchServiceAccountStream (
298- GDCH_SA_FORMAT_VERSION ,
297+ GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ,
299298 null ,
300299 GDCH_SA_PRIVATE_KEY_ID ,
301300 GDCH_SA_PRIVATE_KEY_PKC8 ,
@@ -310,7 +309,7 @@ void fromStream_gdchServiceAccountNoProjectId_throws() throws IOException {
310309 void fromStream_gdchServiceAccountNoPrivateKeyId_throws () throws IOException {
311310 InputStream gdchServiceAccountStream =
312311 GdchCredentialsTest .writeGdchServiceAccountStream (
313- GDCH_SA_FORMAT_VERSION ,
312+ GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ,
314313 GDCH_SA_PROJECT_ID ,
315314 null ,
316315 GDCH_SA_PRIVATE_KEY_PKC8 ,
@@ -325,7 +324,7 @@ void fromStream_gdchServiceAccountNoPrivateKeyId_throws() throws IOException {
325324 void fromStream_gdchServiceAccountNoPrivateKey_throws () throws IOException {
326325 InputStream gdchServiceAccountStream =
327326 GdchCredentialsTest .writeGdchServiceAccountStream (
328- GDCH_SA_FORMAT_VERSION ,
327+ GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ,
329328 GDCH_SA_PROJECT_ID ,
330329 GDCH_SA_PRIVATE_KEY_ID ,
331330 null ,
@@ -340,7 +339,7 @@ void fromStream_gdchServiceAccountNoPrivateKey_throws() throws IOException {
340339 void fromStream_gdchServiceAccountNoServiceIdentityName_throws () throws IOException {
341340 InputStream gdchServiceAccountStream =
342341 GdchCredentialsTest .writeGdchServiceAccountStream (
343- GDCH_SA_FORMAT_VERSION ,
342+ GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ,
344343 GDCH_SA_PROJECT_ID ,
345344 GDCH_SA_PRIVATE_KEY_ID ,
346345 GDCH_SA_PRIVATE_KEY_PKC8 ,
@@ -355,7 +354,7 @@ void fromStream_gdchServiceAccountNoServiceIdentityName_throws() throws IOExcept
355354 void fromStream_gdchServiceAccountNoTokenServerUri_throws () throws IOException {
356355 InputStream gdchServiceAccountStream =
357356 GdchCredentialsTest .writeGdchServiceAccountStream (
358- GDCH_SA_FORMAT_VERSION ,
357+ GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ,
359358 GDCH_SA_PROJECT_ID ,
360359 GDCH_SA_PRIVATE_KEY_ID ,
361360 GDCH_SA_PRIVATE_KEY_PKC8 ,
@@ -380,14 +379,14 @@ void fromStream_gdchServiceAccountInvalidFormatVersion_throws() throws IOExcepti
380379
381380 testFromStreamException (
382381 gdchServiceAccountStream ,
383- String .format ("Only format version %s is supported" , GDCH_SA_FORMAT_VERSION ));
382+ String .format ("Only format version %s is supported" , GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ));
384383 }
385384
386385 @ Test
387386 void fromStream_gdchServiceAccountInvalidCaCertPath_throws () throws IOException {
388387 InputStream gdchServiceAccountStream =
389388 GdchCredentialsTest .writeGdchServiceAccountStream (
390- GDCH_SA_FORMAT_VERSION ,
389+ GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ,
391390 GDCH_SA_PROJECT_ID ,
392391 GDCH_SA_PRIVATE_KEY_ID ,
393392 GDCH_SA_PRIVATE_KEY_PKC8 ,
@@ -854,7 +853,7 @@ void getCredentialInfo_userCredentials() throws IOException {
854853 void getCredentialInfo_gdchCredentials () throws IOException {
855854 InputStream gdchServiceAccountStream =
856855 GdchCredentialsTest .writeGdchServiceAccountStream (
857- GDCH_SA_FORMAT_VERSION ,
856+ GdchCredentials . SUPPORTED_JSON_FORMAT_VERSION ,
858857 GDCH_SA_PROJECT_ID ,
859858 GDCH_SA_PRIVATE_KEY_ID ,
860859 GDCH_SA_PRIVATE_KEY_PKC8 ,
0 commit comments