Skip to content

Commit 03978dd

Browse files
committed
Add test case for SSL trust store parameters in DatabricksConnectionContextTest
- Introduced a new test case to validate the handling of SSL trust store parameters, including SSLTrustStore, SSLTrustStorePwd, SSLTrustStoreType, and SSLTrustStoreProvider. Signed-off-by: [Your Name] <your.email@databricks.com>
1 parent 6844320 commit 03978dd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/test/java/com/databricks/jdbc/api/impl/DatabricksConnectionContextTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,5 +601,13 @@ public void testSSLTrustStoreParameters() throws DatabricksSQLException {
601601
DatabricksConnectionContext connectionContext =
602602
(DatabricksConnectionContext) DatabricksConnectionContext.parse(validJdbcUrl, properties);
603603
assertNull(connectionContext.getSSLTrustStore());
604+
605+
// Test case 2: With truststore parameters
606+
properties.put("SSLTrustStore", "/path/to/truststore.jks");
607+
properties.put("SSLTrustStorePwd", "truststorepassword");
608+
properties.put("SSLTrustStoreType", "PKCS12");
609+
properties.put("SSLTrustStoreProvider", "SunJSSE");
610+
connectionContext =
611+
(DatabricksConnectionContext) DatabricksConnectionContext.parse(validJdbcUrl, properties);
604612
}
605613
}

0 commit comments

Comments
 (0)