From: Razvan Becheriu Date: Thu, 29 Apr 2021 14:05:00 +0000 (+0300) Subject: [#1680] fixed unittests X-Git-Tag: Kea-1.9.8~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2159db4297709b6ff483f2ddec06773d50daa398;p=thirdparty%2Fkea.git [#1680] fixed unittests --- diff --git a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc index 749cebe30c..5137b5b0ab 100644 --- a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc @@ -695,18 +695,8 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCleanupStartFail) { pmap["universe"] = "4"; pmap["name"] = getLeaseFilePath("leasefile4_0.csv"); pmap["lfc-interval"] = "1"; - boost::scoped_ptr lease_mgr(new NakedMemfileLeaseMgr(pmap)); - - // Try to run the lease file cleanup. - ASSERT_NO_THROW(lease_mgr->lfcCallback()); - - // Wait for the LFC process to complete. - ASSERT_TRUE(waitForProcess(*lease_mgr, 2)); - - // And make sure it has returned an error. - EXPECT_EQ(EXIT_FAILURE, lease_mgr->getLFCExitStatus()) - << "Executing the LFC process failed: make sure that" - " the kea-lfc program has been compiled."; + boost::scoped_ptr lease_mgr; + ASSERT_THROW(lease_mgr.reset(new NakedMemfileLeaseMgr(pmap)), ProcessSpawnError); } /// @brief This test checks that the callback function executing the cleanup of the