Commit 06798a6c authored by Francis Dupont's avatar Francis Dupont

[#850] Addressed last comment

parent 5d895f0d
......@@ -1632,7 +1632,11 @@ TEST(CfgSubnets4Test, iface) {
// The interface check can be disabled.
Subnet4ConfigParser parser_no_check(false);
EXPECT_NO_THROW(parser_no_check.parse(elems));
Subnet4Ptr subnet;
EXPECT_NO_THROW(subnet = parser_no_check.parse(elems));
ASSERT_TRUE(subnet);
EXPECT_FALSE(subnet->getIface().unspecified());
EXPECT_EQ("eth1", subnet->getIface().get());
// Retry with the interface check enabled.
Subnet4ConfigParser parser;
......@@ -1640,8 +1644,16 @@ TEST(CfgSubnets4Test, iface) {
// Configure default test interfaces.
IfaceMgrTestConfig config(true);
EXPECT_NO_THROW(parser_no_check.parse(elems));
EXPECT_NO_THROW(parser.parse(elems));
EXPECT_NO_THROW(subnet = parser_no_check.parse(elems));
ASSERT_TRUE(subnet);
EXPECT_FALSE(subnet->getIface().unspecified());
EXPECT_EQ("eth1", subnet->getIface().get());
EXPECT_NO_THROW(subnet = parser.parse(elems));
ASSERT_TRUE(subnet);
EXPECT_FALSE(subnet->getIface().unspecified());
EXPECT_EQ("eth1", subnet->getIface().get());
}
} // end of anonymous namespace
......@@ -1415,7 +1415,11 @@ TEST(CfgSubnets6Test, iface) {
// The interface check can be disabled.
Subnet6ConfigParser parser_no_check(false);
EXPECT_NO_THROW(parser_no_check.parse(elems));
Subnet6Ptr subnet;
EXPECT_NO_THROW(subnet = parser_no_check.parse(elems));
ASSERT_TRUE(subnet);
EXPECT_FALSE(subnet->getIface().unspecified());
EXPECT_EQ("eth1", subnet->getIface().get());
// Retry with the interface check enabled.
Subnet6ConfigParser parser;
......@@ -1423,8 +1427,16 @@ TEST(CfgSubnets6Test, iface) {
// Configure default test interfaces.
IfaceMgrTestConfig config(true);
EXPECT_NO_THROW(parser_no_check.parse(elems));
EXPECT_NO_THROW(parser.parse(elems));
EXPECT_NO_THROW(subnet = parser_no_check.parse(elems));
ASSERT_TRUE(subnet);
EXPECT_FALSE(subnet->getIface().unspecified());
EXPECT_EQ("eth1", subnet->getIface().get());
EXPECT_NO_THROW(subnet = parser.parse(elems));
ASSERT_TRUE(subnet);
EXPECT_FALSE(subnet->getIface().unspecified());
EXPECT_EQ("eth1", subnet->getIface().get());
}
} // end of anonymous namespace
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment