diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 14c1de5..99df4f2 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20241121-075100-c4c87cbc" +distribution-version = "2201.11.0-20241204-163800-0d1e4836" [[package]] org = "ballerina" diff --git a/ballerina/tests/test.bal b/ballerina/tests/test.bal index d690cb8..1c7584b 100644 --- a/ballerina/tests/test.bal +++ b/ballerina/tests/test.bal @@ -283,57 +283,59 @@ public function testSearchWithInvalidType() returns error? { @test:Config{} public function testTlsConnection() returns error? { - ClientSecureSocket clientSecureSocket = { - cert: "tests/resources/server/certs/server.crt", - enable: true - }; - - Client ldapClient = check new ({ - port: 636, - hostName, - password, - domainName, - clientSecureSocket} - ); - - ldapClient->close(); + ClientSecureSocket clientSecureSocket = { + cert: "tests/resources/server/certs/server.crt", + enable: true + }; + + Client ldapClient = check new ({ + port: 636, + hostName, + password, + domainName, + clientSecureSocket} + ); + + boolean isConnected = ldapClient->isConnected(); + test:assertTrue(isConnected); } @test:Config{} public function testTlsConnectionWithInvalidCert() returns error? { - ClientSecureSocket clientSecureSocket = { - cert: "tests/resources/server/certs/invalid.crt", - enable: true - }; - - Client|Error ldapClient = new ({ - port: 636, - hostName, - password, - domainName, - clientSecureSocket} - ); - - test:assertTrue(ldapClient is Error); + ClientSecureSocket clientSecureSocket = { + cert: "tests/resources/server/certs/invalid.crt", + enable: true + }; + + Client|Error ldapClient = new ({ + port: 636, + hostName, + password, + domainName, + clientSecureSocket} + ); + + test:assertTrue(ldapClient is Error); } @test:Config{} public function testTlsConnectionWithTrustStore() returns error? { - ClientSecureSocket clientSecureSocket = { - cert: { - path: "tests/resources/server/certs/truststore.p12", - password: "password" - } - }; - - Client ldapClient = check new ({ - port: 636, - hostName, - password, - domainName, - clientSecureSocket} - ); - - ldapClient->close(); + ClientSecureSocket clientSecureSocket = { + cert: { + path: "tests/resources/server/certs/truststore.p12", + password: "password" + } + }; + + Client ldapClient = check new ({ + port: 636, + hostName, + password, + domainName, + clientSecureSocket} + ); + + boolean isConnected = ldapClient->isConnected(); + test:assertTrue(isConnected); }