Skip to content

Commit fa12678

Browse files
authored
Fix test that was picking up configuration from the environment (#287)
## Changes The test is written to specifically test one branch so it should be isolated from the environment. Resolve the configuration with an empty `Environment` instance to achieve this. This test was added in #277. ## Tests * Unit test passes. * Confirmed it also passes when environment variables that are used in the nightlies are set.
1 parent e2c76b6 commit fa12678

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ public void testWorkspaceLevelOidcEndpointsWithAccountId() throws IOException {
9090
"{\"authorization_endpoint\":\"https://test-workspace.cloud.databricks.com/oidc/v1/authorize\"}")) {
9191
DatabricksConfig c =
9292
new DatabricksConfig().setHost(server.getUrl()).setAccountId("1234567890");
93-
c.resolve();
93+
c.resolve(
94+
new Environment(new HashMap<>(), new ArrayList<String>(), System.getProperty("os.name")));
9495
assertEquals(
9596
c.getOidcEndpoints().getAuthorizationEndpoint(),
9697
"https://test-workspace.cloud.databricks.com/oidc/v1/authorize");

0 commit comments

Comments
 (0)