From: Marcin Siodelski Date: Tue, 11 Mar 2014 20:16:01 +0000 (+0100) Subject: [3232] Open fake interfaces for Rebind tests. X-Git-Tag: kea-eng-20140313~11^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b11c068ec0e9d5614b8f7af2c4040466942e29ab;p=thirdparty%2Fkea.git [3232] Open fake interfaces for Rebind tests. --- diff --git a/src/bin/dhcp6/tests/Makefile.am b/src/bin/dhcp6/tests/Makefile.am index 1cbbf6d6bd..736e2af83d 100644 --- a/src/bin/dhcp6/tests/Makefile.am +++ b/src/bin/dhcp6/tests/Makefile.am @@ -90,6 +90,7 @@ nodist_dhcp6_unittests_SOURCES += marker_file.h test_libraries.h dhcp6_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) dhcp6_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS) dhcp6_unittests_LDADD = $(GTEST_LDADD) +dhcp6_unittests_LDADD += $(top_builddir)/src/lib/dhcp/tests/libdhcptest.la dhcp6_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la dhcp6_unittests_LDADD += $(top_builddir)/src/lib/cc/libb10-cc.la dhcp6_unittests_LDADD += $(top_builddir)/src/lib/config/libb10-cfgclient.la diff --git a/src/bin/dhcp6/tests/rebind_unittest.cc b/src/bin/dhcp6/tests/rebind_unittest.cc index de7e59ba0c..2de10d1b4f 100644 --- a/src/bin/dhcp6/tests/rebind_unittest.cc +++ b/src/bin/dhcp6/tests/rebind_unittest.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -198,6 +199,15 @@ const char* REBIND_CONFIGS[] = { /// @brief Test fixture class for testing Rebind. class RebindTest : public Dhcpv6SrvTest { public: + + /// @brief Constructor. + /// + /// Sets up fake interfaces. + RebindTest() + : Dhcpv6SrvTest(), + iface_mgr_test_config_(true) { + } + /// @brief Configure the DHCPv6 server using the JSON string. /// /// @param config New configuration in JSON format. @@ -214,6 +224,9 @@ public: void requestLease(const int config_index, const int subnets_num, Dhcp6Client& client); + /// @brief Interface Manager's fake configuration control. + IfaceMgrTestConfig iface_mgr_test_config_; + }; void