11package com .databricks .sdk .integration ;
22
33import com .databricks .sdk .WorkspaceClient ;
4- import com .databricks .sdk .core .DatabricksConfig ;
54import com .databricks .sdk .core .oauth .OpenIDConnectEndpoints ;
65import com .databricks .sdk .integration .framework .EnvContext ;
76import com .databricks .sdk .integration .framework .EnvTest ;
87import java .io .IOException ;
98import org .junit .jupiter .api .Test ;
10- import org .junit .jupiter .api .condition .EnabledIfEnvironmentVariable ;
119import org .junit .jupiter .api .extension .ExtendWith ;
1210
1311@ EnvContext ("ucws" )
@@ -20,20 +18,4 @@ void checkEndpoints(WorkspaceClient w) throws IOException {
2018 assert endpoints .getAuthorizationEndpoint ().equals (host + "/oidc/v1/authorize" );
2119 assert endpoints .getTokenEndpoint ().equals (host + "/oidc/v1/token" );
2220 }
23-
24- @ Test
25- @ EnabledIfEnvironmentVariable (named = "UNIFIED_HOST" , matches = ".+" )
26- void unifiedEndpointsForSpog (WorkspaceClient c ) throws IOException {
27- String unifiedHost = System .getenv ("UNIFIED_HOST" );
28- DatabricksConfig cfg = c .config ();
29- cfg .setHost (unifiedHost );
30- cfg .setExperimentalIsUnifiedHost (true );
31- OpenIDConnectEndpoints endpoints = cfg .getOidcEndpoints ();
32- String host = cfg .getHost ();
33- String accountId = cfg .getAccountId ();
34- assert endpoints
35- .getAuthorizationEndpoint ()
36- .equals (host + "/oidc/accounts/" + accountId + "/v1/authorize" );
37- assert endpoints .getTokenEndpoint ().equals (host + "/oidc/accounts/" + accountId + "/v1/token" );
38- }
3921}
0 commit comments