]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#34] Added a Tcp UT
authorFrancis Dupont <fdupont@isc.org>
Wed, 22 Dec 2021 15:48:23 +0000 (16:48 +0100)
committerFrancis Dupont <fdupont@isc.org>
Thu, 6 Jan 2022 12:12:40 +0000 (13:12 +0100)
src/lib/mysql/tests/mysql_connection_unittest.cc

index 972f5f683b831fb12836cab457b2dc896d857334..db987d281ee484f4096d42b00197ba9b59af4c27 100644 (file)
@@ -691,6 +691,15 @@ TEST_F(MySqlSecureConnectionTest, getMySQLTls) {
     }
 }
 
+/// @brief Check the enforced TCP connection.
+TEST_F(MySqlSecureConnectionTest, Tcp) {
+    std::string conn_str = connectionString(MYSQL_VALID_TYPE, VALID_NAME,
+                                            VALID_HOST_TCP, VALID_USER,
+                                            VALID_PASSWORD);
+    MySqlConnection conn(DatabaseConnection::parse(conn_str));
+    ASSERT_NO_THROW(conn.openDatabase());
+}
+
 /// @brief Check the SSL/TLS protected connection.
 TEST_F(MySqlSecureConnectionTest, Tls) {
     if (!hasMySQLTls()) {