|
@@ -555,7 +555,7 @@ public:
|
|
|
const std::string& parameter) {
|
|
|
ConstElementPtr x;
|
|
|
std::string config = createConfigWithOption(param_value, parameter);
|
|
|
- ConstElementPtr json = parseJSON(config);
|
|
|
+ ConstElementPtr json = parseDHCP6(config);
|
|
|
EXPECT_NO_THROW(x = configureDhcp6Server(srv_, json));
|
|
|
checkResult(x, 1);
|
|
|
EXPECT_TRUE(errorContainsPosition(x, "<string>"));
|
|
@@ -573,7 +573,7 @@ public:
|
|
|
testInvalidOptionParam(const std::map<std::string, std::string>& params) {
|
|
|
ConstElementPtr x;
|
|
|
std::string config = createConfigWithOption(params);
|
|
|
- ConstElementPtr json = parseJSON(config);
|
|
|
+ ConstElementPtr json = parseDHCP6(config);
|
|
|
EXPECT_NO_THROW(x = configureDhcp6Server(srv_, json));
|
|
|
checkResult(x, 1);
|
|
|
EXPECT_TRUE(errorContainsPosition(x, "<string>"));
|
|
@@ -674,7 +674,7 @@ public:
|
|
|
CfgMgr::instance().clear();
|
|
|
|
|
|
// Configure the server.
|
|
|
- ConstElementPtr json = parseJSON(config);
|
|
|
+ ConstElementPtr json = parseDHCP6(config);
|
|
|
|
|
|
// Make sure that the configuration was successful.
|
|
|
ConstElementPtr status;
|
|
@@ -737,11 +737,11 @@ public:
|
|
|
// config update.
|
|
|
TEST_F(Dhcp6ParserTest, version) {
|
|
|
|
|
|
- ConstElementPtr x;
|
|
|
-
|
|
|
- EXPECT_NO_THROW(x = configureDhcp6Server(srv_,
|
|
|
- parseJSON("{\"version\": 0}")));
|
|
|
+ ConstElementPtr json;
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6("{\"version\": 0}"));
|
|
|
|
|
|
+ ConstElementPtr x;
|
|
|
+ EXPECT_NO_THROW(x = configureDhcp6Server(srv_, json));
|
|
|
// returned value must be 0 (configuration accepted)
|
|
|
checkResult(x, 0);
|
|
|
}
|
|
@@ -757,6 +757,9 @@ TEST_F(Dhcp6ParserTest, bogusCommand) {
|
|
|
|
|
|
// returned value must be 1 (configuration parse error)
|
|
|
checkResult(x, 1);
|
|
|
+
|
|
|
+ // it should be refused by syntax too
|
|
|
+ EXPECT_THROW(parseDHCP6("{\"bogus\": 5}"), Dhcp6ParseError);
|
|
|
}
|
|
|
|
|
|
/// The goal of this test is to verify if configuration without any
|
|
@@ -1119,7 +1122,7 @@ TEST_F(Dhcp6ParserTest, subnetLocal) {
|
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -1216,8 +1219,7 @@ TEST_F(Dhcp6ParserTest, interfaceGlobal) {
|
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
cout << config << endl;
|
|
|
|
|
|
- ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ConstElementPtr json = parseJSON(config);
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -1225,6 +1227,8 @@ TEST_F(Dhcp6ParserTest, interfaceGlobal) {
|
|
|
// returned value should be 1 (parse error)
|
|
|
checkResult(status, 1);
|
|
|
EXPECT_TRUE(errorContainsPosition(status, "<string>"));
|
|
|
+
|
|
|
+ EXPECT_THROW(parseDHCP6(config), Dhcp6ParseError);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1248,7 +1252,7 @@ TEST_F(Dhcp6ParserTest, subnetInterfaceId) {
|
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -1289,8 +1293,7 @@ TEST_F(Dhcp6ParserTest, interfaceIdGlobal) {
|
|
|
" \"subnet\": \"2001:db8:1::/64\" } ],"
|
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
- ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ConstElementPtr json = parseJSON(config);
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -1298,6 +1301,8 @@ TEST_F(Dhcp6ParserTest, interfaceIdGlobal) {
|
|
|
// Returned value should be 1 (parse error)
|
|
|
checkResult(status, 1);
|
|
|
EXPECT_TRUE(errorContainsPosition(status, "<string>"));
|
|
|
+
|
|
|
+ EXPECT_THROW(parseDHCP6(config), Dhcp6ParseError);
|
|
|
}
|
|
|
|
|
|
// This test checks if it is not possible to define a subnet with an
|
|
@@ -1315,7 +1320,7 @@ TEST_F(Dhcp6ParserTest, subnetInterfaceAndInterfaceId) {
|
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -1517,7 +1522,7 @@ TEST_F(Dhcp6ParserTest, pdPoolBasics) {
|
|
|
|
|
|
// Convert the JSON string into Elements.
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
// Verify that DHCP6 configuration processing succeeds.
|
|
|
// Returned value must be non-empty ConstElementPtr to config result.
|
|
@@ -1655,7 +1660,7 @@ TEST_F(Dhcp6ParserTest, pdPoolList) {
|
|
|
|
|
|
// Convert the JSON string into Elements.
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
// Verify that DHCP6 configuration processing succeeds.
|
|
|
// Returned value must be non-empty ConstElementPtr to config result.
|
|
@@ -1711,7 +1716,7 @@ TEST_F(Dhcp6ParserTest, subnetAndPrefixDelegated) {
|
|
|
|
|
|
// Convert the JSON string into Elements.
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
// Verify that DHCP6 configuration processing succeeds.
|
|
|
// Returned value must be non-empty ConstElementPtr to config result.
|
|
@@ -1754,7 +1759,7 @@ TEST_F(Dhcp6ParserTest, invalidPdPools) {
|
|
|
|
|
|
const char *config[] = {
|
|
|
// No prefix.
|
|
|
- "{ \"interfaces-config\": { },"
|
|
|
+ "{ \"interfaces-config\": { \"interfaces\": [ ] },"
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"rebind-timer\": 2000, "
|
|
|
"\"renew-timer\": 1000, "
|
|
@@ -1768,7 +1773,7 @@ TEST_F(Dhcp6ParserTest, invalidPdPools) {
|
|
|
"\"valid-lifetime\": 4000 }"
|
|
|
"] }",
|
|
|
// No prefix-len.
|
|
|
- "{ \"interfaces-config\": { },"
|
|
|
+ "{ \"interfaces-config\": { \"interfaces\": [ ] },"
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"rebind-timer\": 2000, "
|
|
|
"\"renew-timer\": 1000, "
|
|
@@ -1781,7 +1786,7 @@ TEST_F(Dhcp6ParserTest, invalidPdPools) {
|
|
|
"\"valid-lifetime\": 4000 }"
|
|
|
"] }",
|
|
|
// No delegated-len.
|
|
|
- "{ \"interfaces-config\": { },"
|
|
|
+ "{ \"interfaces-config\": { \"interfaces\": [ ] },"
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"rebind-timer\": 2000, "
|
|
|
"\"renew-timer\": 1000, "
|
|
@@ -1794,7 +1799,7 @@ TEST_F(Dhcp6ParserTest, invalidPdPools) {
|
|
|
"\"valid-lifetime\": 4000 }"
|
|
|
"] }",
|
|
|
// Delegated length is too short.
|
|
|
- "{ \"interfaces-config\": { },"
|
|
|
+ "{ \"interfaces-config\": { \"interfaces\": [ ] },"
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"rebind-timer\": 2000, "
|
|
|
"\"renew-timer\": 1000, "
|
|
@@ -1813,7 +1818,7 @@ TEST_F(Dhcp6ParserTest, invalidPdPools) {
|
|
|
int num_msgs = sizeof(config)/sizeof(char*);
|
|
|
for (unsigned int i = 0; i < num_msgs; i++) {
|
|
|
// Convert JSON string to Elements.
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config[i]));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config[i]));
|
|
|
|
|
|
// Configuration processing should fail without a throw.
|
|
|
ASSERT_NO_THROW(x = configureDhcp6Server(srv_, json));
|
|
@@ -1903,7 +1908,7 @@ TEST_F(Dhcp6ParserTest, optionDefRecord) {
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseOPTION_DEF(config));
|
|
|
|
|
|
// Make sure that the particular option definition does not exist.
|
|
|
OptionDefinitionPtr def = CfgMgr::instance().getStagingCfg()->
|
|
@@ -2062,7 +2067,7 @@ TEST_F(Dhcp6ParserTest, optionDefArray) {
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseOPTION_DEF(config));
|
|
|
|
|
|
// Make sure that the particular option definition does not exist.
|
|
|
OptionDefinitionPtr def = CfgMgr::instance().getStagingCfg()->
|
|
@@ -2102,7 +2107,7 @@ TEST_F(Dhcp6ParserTest, optionDefEncapsulate) {
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseOPTION_DEF(config));
|
|
|
|
|
|
// Make sure that the particular option definition does not exist.
|
|
|
OptionDefinitionPtr def = CfgMgr::instance().getStagingCfg()->
|
|
@@ -2192,7 +2197,7 @@ TEST_F(Dhcp6ParserTest, optionDefInvalidRecordType) {
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseOPTION_DEF(config));
|
|
|
|
|
|
// Use the configuration string to create new option definition.
|
|
|
ConstElementPtr status;
|
|
@@ -2247,7 +2252,7 @@ TEST_F(Dhcp6ParserTest, optionDefEncapsulatedSpaceAndArray) {
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseOPTION_DEF(config));
|
|
|
|
|
|
// Use the configuration string to create new option definition.
|
|
|
ConstElementPtr status;
|
|
@@ -2273,7 +2278,7 @@ TEST_F(Dhcp6ParserTest, optionDefEncapsulateOwnSpace) {
|
|
|
" } ]"
|
|
|
"}";
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseOPTION_DEF(config));
|
|
|
|
|
|
// Use the configuration string to create new option definition.
|
|
|
ConstElementPtr status;
|
|
@@ -2696,8 +2701,7 @@ TEST_F(Dhcp6ParserTest, optionDataEncapsulate) {
|
|
|
" } ]"
|
|
|
"}";
|
|
|
|
|
|
-
|
|
|
- json = parseJSON(config);
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
|
ASSERT_TRUE(status);
|
|
@@ -3013,7 +3017,7 @@ TEST_F(Dhcp6ParserTest, optionDataBoolean) {
|
|
|
sizeof(expected_option_data));
|
|
|
|
|
|
// Bogus values should not be accepted.
|
|
|
- params["data"] = "bugus";
|
|
|
+ params["data"] = "bogus";
|
|
|
testInvalidOptionParam(params);
|
|
|
|
|
|
params["data"] = "2";
|
|
@@ -3676,7 +3680,7 @@ TEST_F(Dhcp6ParserTest, subnetRelayInfo) {
|
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -3816,7 +3820,7 @@ TEST_F(Dhcp6ParserTest, d2ClientConfig) {
|
|
|
|
|
|
// Convert the JSON string to configuration elements.
|
|
|
ConstElementPtr config;
|
|
|
- ASSERT_NO_THROW(config = parseJSON(config_str));
|
|
|
+ ASSERT_NO_THROW(config = parseDHCP6(config_str));
|
|
|
|
|
|
// Pass the configuration in for parsing.
|
|
|
ConstElementPtr status;
|
|
@@ -3877,7 +3881,7 @@ TEST_F(Dhcp6ParserTest, invalidD2ClientConfig) {
|
|
|
|
|
|
// Convert the JSON string to configuration elements.
|
|
|
ConstElementPtr config;
|
|
|
- ASSERT_NO_THROW(config = parseJSON(config_str));
|
|
|
+ ASSERT_NO_THROW(config = parseDHCP6(config_str));
|
|
|
|
|
|
// Configuration should not throw, but should fail.
|
|
|
ConstElementPtr status;
|
|
@@ -4203,12 +4207,13 @@ TEST_F(Dhcp6ParserTest, reservationBogus) {
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
- ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ConstElementPtr json = parseJSON(config);
|
|
|
|
|
|
EXPECT_NO_THROW(x = configureDhcp6Server(srv_, json));
|
|
|
checkResult(x, 1);
|
|
|
|
|
|
+ EXPECT_THROW(parseDHCP6(config), Dhcp6ParseError);
|
|
|
+
|
|
|
// Case 2: DUID and HW Address both specified.
|
|
|
config = "{ " + genIfaceConfig() + ","
|
|
|
"\"rebind-timer\": 2000, "
|
|
@@ -4338,6 +4343,7 @@ TEST_F(Dhcp6ParserTest, macSources) {
|
|
|
|
|
|
/// The goal of this test is to verify that MAC sources configuration can be
|
|
|
/// empty.
|
|
|
+/// Note the Dhcp6 parser requires the list to NOT be empty?!
|
|
|
TEST_F(Dhcp6ParserTest, macSourcesEmpty) {
|
|
|
|
|
|
ConstElementPtr status;
|
|
@@ -4414,10 +4420,11 @@ TEST_F(Dhcp6ParserTest, hostReservationPerSubnet) {
|
|
|
" } ],"
|
|
|
"\"valid-lifetime\": 4000 }";
|
|
|
|
|
|
- ConstElementPtr status;
|
|
|
+ ConstElementPtr json;
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(HR_CONFIG));
|
|
|
|
|
|
- EXPECT_NO_THROW(status = configureDhcp6Server(srv_,
|
|
|
- parseJSON(HR_CONFIG)));
|
|
|
+ ConstElementPtr status;
|
|
|
+ EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
|
|
|
|
// returned value should be 0 (success)
|
|
|
checkResult(status, 0);
|
|
@@ -4459,7 +4466,7 @@ TEST_F(Dhcp6ParserTest, rsooNumbers) {
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
ASSERT_NO_THROW(json =
|
|
|
- parseDHCP6("{ " + genIfaceConfig() + ","
|
|
|
+ parseDHCP6("{ " + genIfaceConfig() + ","
|
|
|
"\"relay-supplied-options\": [ \"10\", \"20\", \"30\" ],"
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"rebind-timer\": 2000, "
|
|
@@ -4494,7 +4501,7 @@ TEST_F(Dhcp6ParserTest, rsooNames) {
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
ASSERT_NO_THROW(json =
|
|
|
- parseDHCP6("{ " + genIfaceConfig() + ","
|
|
|
+ parseDHCP6("{ " + genIfaceConfig() + ","
|
|
|
"\"relay-supplied-options\": [ \"dns-servers\", \"remote-id\" ],"
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"rebind-timer\": 2000, "
|
|
@@ -4544,7 +4551,7 @@ TEST_F(Dhcp6ParserTest, rsooNames) {
|
|
|
TEST_F(Dhcp6ParserTest, rsooNegativeNumber) {
|
|
|
ConstElementPtr json;
|
|
|
ASSERT_NO_THROW(json =
|
|
|
- parseDHCP6("{ " + genIfaceConfig() + ","
|
|
|
+ parseDHCP6("{ " + genIfaceConfig() + ","
|
|
|
"\"relay-supplied-options\": [ \"80\", \"-2\" ],"
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"rebind-timer\": 2000, "
|
|
@@ -4562,7 +4569,7 @@ TEST_F(Dhcp6ParserTest, rsooNegativeNumber) {
|
|
|
TEST_F(Dhcp6ParserTest, rsooBogusName) {
|
|
|
ConstElementPtr json;
|
|
|
ASSERT_NO_THROW(json =
|
|
|
- parseDHCP6("{ " + genIfaceConfig() + ","
|
|
|
+ parseDHCP6("{ " + genIfaceConfig() + ","
|
|
|
"\"relay-supplied-options\": [ \"bogus\", \"dns-servers\" ],"
|
|
|
"\"preferred-lifetime\": 3000,"
|
|
|
"\"rebind-timer\": 2000, "
|
|
@@ -4584,7 +4591,7 @@ TEST_F(Dhcp6ParserTest, declineTimerDefault) {
|
|
|
"\"subnet6\": [ ] "
|
|
|
"}";
|
|
|
ConstElementPtr config;
|
|
|
- ASSERT_NO_THROW(config = parseJSON(config_txt));
|
|
|
+ ASSERT_NO_THROW(config = parseDHCP6(config_txt));
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, config));
|
|
@@ -4606,7 +4613,7 @@ TEST_F(Dhcp6ParserTest, declineTimer) {
|
|
|
"}";
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -4627,8 +4634,7 @@ TEST_F(Dhcp6ParserTest, declineTimerError) {
|
|
|
"\"subnet6\": [ ]"
|
|
|
"}";
|
|
|
|
|
|
- ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ConstElementPtr json = parseJSON(config);
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -4638,6 +4644,9 @@ TEST_F(Dhcp6ParserTest, declineTimerError) {
|
|
|
|
|
|
// Check that the error contains error position.
|
|
|
EXPECT_TRUE(errorContainsPosition(status, "<string>"));
|
|
|
+
|
|
|
+ // Check that the Dhcp6 parser catches the type error
|
|
|
+ EXPECT_THROW(parseDHCP6(config), Dhcp6ParseError);
|
|
|
}
|
|
|
|
|
|
// Check that configuration for the expired leases processing may be
|
|
@@ -4658,7 +4667,7 @@ TEST_F(Dhcp6ParserTest, expiredLeasesProcessing) {
|
|
|
"}";
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -4699,7 +4708,7 @@ TEST_F(Dhcp6ParserTest, expiredLeasesProcessingError) {
|
|
|
"}";
|
|
|
|
|
|
ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ASSERT_NO_THROW(json = parseDHCP6(config));
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
@@ -4777,13 +4786,14 @@ TEST_F(Dhcp6ParserTest, invalidClientClassDictionary) {
|
|
|
" } ] \n"
|
|
|
"} \n";
|
|
|
|
|
|
- ConstElementPtr json;
|
|
|
- ASSERT_NO_THROW(json = parseJSON(config));
|
|
|
+ ConstElementPtr json = parseJSON(config);
|
|
|
|
|
|
ConstElementPtr status;
|
|
|
EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json));
|
|
|
ASSERT_TRUE(status);
|
|
|
checkResult(status, 1);
|
|
|
+
|
|
|
+ EXPECT_THROW(parseDHCP6(config), Dhcp6ParseError);
|
|
|
}
|
|
|
|
|
|
// Test verifies that regular configuration does not provide any user context
|