From f71cf3be1fe718143019fa4105ed1071e94af3d1 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Sun, 27 May 2018 00:02:05 +0200 Subject: [PATCH] [master] Put testDbLostCallback in ifdefs --- src/lib/dhcpsrv/tests/host_mgr_unittest.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/dhcpsrv/tests/host_mgr_unittest.cc b/src/lib/dhcpsrv/tests/host_mgr_unittest.cc index fccec64651..3b6fb390bc 100644 --- a/src/lib/dhcpsrv/tests/host_mgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/host_mgr_unittest.cc @@ -574,6 +574,7 @@ public: /// string virtual std::string validConnectString() = 0; +#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) /// @brief Verifies the host manager's behavior if DB connection is lost /// /// This function creates a host manager with an alternate data source @@ -585,6 +586,7 @@ public: /// -# The Query throws DbOperationError (rather than exiting) /// -# The registered DbLostCallback was invoked void testDbLostCallback(); +#endif /// @brief Callback function registered with the host manager bool db_lost_callback(ReconnectCtlPtr /* not_used */) { @@ -595,7 +597,7 @@ public: bool callback_called_; }; - +#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) void HostMgrDbLostCallbackTest::testDbLostCallback() { // Create the HostMgr. @@ -633,6 +635,7 @@ HostMgrDbLostCallbackTest::testDbLostCallback() { // Our lost connectivity callback should have been invoked. EXPECT_TRUE(callback_called_); } +#endif // The following tests require MySQL enabled. #if defined HAVE_MYSQL -- 2.47.2