Skip to content

Commit 65751d0

Browse files
Use CLOUD_PROVIDER instead of host to determine which tests to run (#639)
## What changes are proposed in this pull request? Use CLOUD_PROVIDER instead of host to determine which tests to run. This decouples test run from host parsing and allows testing Cloud specific features on cloud agnostic hosts. ## How is this tested? Check test run and validate that the test runs only when expected <img width="1425" height="97" alt="Screenshot 2026-01-28 at 12 46 22" src="https://github.com/user-attachments/assets/f01ae9c4-925d-4535-bb9c-ffd90bb0cb37" /> <img width="1380" height="72" alt="Screenshot 2026-01-28 at 12 46 51" src="https://github.com/user-attachments/assets/e7b2ca10-4d7f-4b9a-9251-670c1cc2d0a7" /> NO_CHANGELOG=true
1 parent 23933bf commit 65751d0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

databricks-sdk-java/src/test/java/com/databricks/sdk/integration/CredentialsIT.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@
1111

1212
@EnvContext("account")
1313
@DisabledIfEnvironmentVariable(named = "ARM_CLIENT_ID", matches = ".*")
14+
// Skipping this test for GCP because this api is not enabled in GCP.
15+
@DisabledIfEnvironmentVariable(named = "CLOUD_PROVIDER", matches = "GCP")
1416
@ExtendWith(EnvTest.class)
1517
public class CredentialsIT {
1618
@Test
1719
void lists(AccountClient a) {
18-
// Skipping this test for GCP because this api is not enabled in GCP.
19-
if (!a.config().isGcp()) {
20-
Iterable<Credential> list = a.credentials().list();
20+
Iterable<Credential> list = a.credentials().list();
2121

22-
java.util.List<Credential> all = CollectionUtils.asList(list);
22+
java.util.List<Credential> all = CollectionUtils.asList(list);
2323

24-
CollectionUtils.assertUnique(all);
25-
}
24+
CollectionUtils.assertUnique(all);
2625
}
2726
}

0 commit comments

Comments
 (0)