1616
1717package com .google .cloud .bigquery .jdbc .it ;
1818
19-
2019import static org .junit .jupiter .api .Assertions .assertEquals ;
2120import static org .junit .jupiter .api .Assertions .assertFalse ;
2221import static org .junit .jupiter .api .Assertions .assertNotNull ;
@@ -105,11 +104,7 @@ public void testValidServiceAccountAuthentication() throws SQLException, IOExcep
105104
106105 @ Test
107106 public void testServiceAccountAuthenticationMissingOAuthPvtKeyPath () throws SQLException {
108- String connection_uri =
109- getBaseConnectionUrl ()
110- + "ProjectId="
111- + PROJECT_ID
112- + ";OAuthType=0;" ;
107+ String connection_uri = getBaseConnectionUrl () + "ProjectId=" + PROJECT_ID + ";OAuthType=0;" ;
113108
114109 try {
115110 DriverManager .getConnection (connection_uri );
@@ -193,7 +188,8 @@ public void testValidServiceAccountAuthenticationP12() throws SQLException, IOEx
193188 @ Disabled
194189 public void testValidGoogleUserAccountAuthentication () throws SQLException {
195190 String connection_uri =
196- getBaseConnectionUrl () + "PROJECTID="
191+ getBaseConnectionUrl ()
192+ + "PROJECTID="
197193 + PROJECT_ID
198194 + ";OAuthType=1;OAuthClientId=client_id;OAuthClientSecret=client_secret;" ;
199195
@@ -214,7 +210,8 @@ public void testValidGoogleUserAccountAuthentication() throws SQLException {
214210 @ Disabled
215211 public void testValidExternalAccountAuthentication () throws SQLException {
216212 String connection_uri =
217- getBaseConnectionUrl () + "PROJECTID="
213+ getBaseConnectionUrl ()
214+ + "PROJECTID="
218215 + PROJECT_ID
219216 + ";OAUTHTYPE=4;"
220217 + "BYOID_AudienceUri=//iam.googleapis.com/projects/<project>/locations/<location>/workloadIdentityPools/<pool>/providers/<provider>;"
@@ -238,7 +235,8 @@ public void testValidExternalAccountAuthentication() throws SQLException {
238235 @ Disabled
239236 public void testValidExternalAccountAuthenticationFromFile () throws SQLException {
240237 String connection_uri =
241- getBaseConnectionUrl () + "PROJECTID="
238+ getBaseConnectionUrl ()
239+ + "PROJECTID="
242240 + PROJECT_ID
243241 + ";OAUTHTYPE=4;"
244242 + "OAuthPvtKeyPath=/path/to/file;" ;
@@ -260,7 +258,8 @@ public void testValidExternalAccountAuthenticationFromFile() throws SQLException
260258 @ Disabled
261259 public void testValidExternalAccountAuthenticationRawJson () throws SQLException {
262260 String connection_uri =
263- getBaseConnectionUrl () + "PROJECTID="
261+ getBaseConnectionUrl ()
262+ + "PROJECTID="
264263 + PROJECT_ID
265264 + ";OAUTHTYPE=4;OAuthPvtKey={\n "
266265 + " \" universe_domain\" : \" googleapis.com\" ,\n "
@@ -304,7 +303,8 @@ public void testValidPreGeneratedAccessTokenAuthentication(String scope, boolean
304303 String accessToken = credentials .getAccessToken ().getTokenValue ();
305304
306305 String connectionUri =
307- getBaseConnectionUrl () + "ProjectId="
306+ getBaseConnectionUrl ()
307+ + "ProjectId="
308308 + authJson .get ("project_id" ).getAsString ()
309309 + ";OAuthType=2"
310310 + ";OAuthAccessToken="
@@ -320,7 +320,8 @@ public void testValidPreGeneratedAccessTokenAuthentication(String scope, boolean
320320 @ Disabled
321321 public void testValidRefreshTokenAuthentication () throws SQLException {
322322 String connection_uri =
323- getBaseConnectionUrl () + "PROJECTID="
323+ getBaseConnectionUrl ()
324+ + "PROJECTID="
324325 + PROJECT_ID
325326 + ";OAUTHTYPE=2;OAuthRefreshToken=refresh_token;"
326327 + ";OAuthClientId=client;OAuthClientSecret=secret;" ;
0 commit comments