Skip to content

Commit 27c3239

Browse files
committed
Remove account fallback test that requires resolvedHostType in getHostType()
testResolveHostMetadataFallsBackToAccountIdWhenNoDefaultOidcAudience relies on resolvedHostType influencing getHostType(), which is only implemented in PR #749 (hosttype-resolved branch). Moved to that branch.
1 parent 9676aaf commit 27c3239

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

databricks-sdk-java/src/test/java/com/databricks/sdk/core/DatabricksConfigTest.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -800,31 +800,6 @@ public void testResolveHostMetadataDoesNotOverrideExistingTokenAudienceWithOidcA
800800
}
801801
}
802802

803-
@Test
804-
public void testResolveHostMetadataFallsBackToAccountIdWhenNoDefaultOidcAudience()
805-
throws IOException {
806-
// When no default_oidc_audience, should fall back to account_id for account hosts.
807-
// Use host_type=account in metadata so getClientType() returns ACCOUNT.
808-
String response =
809-
"{\"oidc_endpoint\":\"https://acc.databricks.com/oidc/accounts/{account_id}\","
810-
+ "\"account_id\":\""
811-
+ DUMMY_ACCOUNT_ID
812-
+ "\","
813-
+ "\"host_type\":\"account\"}";
814-
try (FixtureServer server =
815-
new FixtureServer()
816-
.with("GET", "/.well-known/databricks-config", response, 200)) {
817-
DatabricksConfig config =
818-
new DatabricksConfig()
819-
.setHost(server.getUrl())
820-
.setAccountId(DUMMY_ACCOUNT_ID);
821-
config.resolve(emptyEnv());
822-
// resolve() triggers tryResolveHostMetadata() which sets resolvedHostType=ACCOUNTS,
823-
// then the tokenAudience fallback sets tokenAudience to accountId.
824-
assertEquals(DUMMY_ACCOUNT_ID, config.getTokenAudience());
825-
}
826-
}
827-
828803
// --- discoveryUrl / OIDC endpoint tests ---
829804

830805
@Test

0 commit comments

Comments
 (0)