}
}
+// Basic test that checks if it's possible to specify outbound-interface.
+TEST(ParserTest, outboundIface) {
+ std::string fname = string(CFG_EXAMPLES) + "/" + "advanced.json";
+ Parser4Context ctx;
+ ConstElementPtr test_json = ctx.parseFile(fname, Parser4Context::PARSER_DHCP4);
+
+ ConstElementPtr tmp;
+ tmp = test_json->get("Dhcp4");
+ ASSERT_TRUE(tmp);
+
+ tmp = tmp->get("interfaces-config");
+ ASSERT_TRUE(tmp);
+
+ tmp = tmp->get("outbound-interface");
+ ASSERT_TRUE(tmp);
+ EXPECT_EQ(Element::string, tmp->getType());
+ EXPECT_EQ("use-routing", tmp->stringValue());
+}
+
/// @brief Tests error conditions in Dhcp4Parser
///
/// @param txt text to be parsed