Parcourir la source

[4206] Fixed Dhcp4 unit test failure under OS-X

src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
    TEST_F(Dhcpv4SrvTest, emptyClientId)
        Added code to set up test interfaces
Thomas Markwalder il y a 9 ans
Parent
commit
ed0fd7d485
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      src/bin/dhcp4/tests/dhcp4_srv_unittest.cc

+ 2 - 0
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc

@@ -2663,6 +2663,8 @@ TEST_F(Dhcpv4SrvTest, statisticsUnknownRcvd) {
 // This test verifies that the server is able to handle an empty client-id
 // This test verifies that the server is able to handle an empty client-id
 // in incoming client message.
 // in incoming client message.
 TEST_F(Dhcpv4SrvTest, emptyClientId) {
 TEST_F(Dhcpv4SrvTest, emptyClientId) {
+    IfaceMgrTestConfig test_config(true);
+    IfaceMgr::instance().openSockets4();
     Dhcp4Client client;
     Dhcp4Client client;
 
 
     EXPECT_NO_THROW(configure(CONFIGS[0], *client.getServer()));
     EXPECT_NO_THROW(configure(CONFIGS[0], *client.getServer()));