From: Francis Dupont Date: Sat, 4 Mar 2017 16:01:05 +0000 (+0100) Subject: [5145b] And D2 client config short cut unit tests X-Git-Tag: fdunparse2_base X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f15dee70541f385ce2ce0cd376c190382439c73a;p=thirdparty%2Fkea.git [5145b] And D2 client config short cut unit tests --- diff --git a/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc b/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc index e8c48e709d..d43fc2c5ed 100644 --- a/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc +++ b/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc @@ -1858,29 +1858,6 @@ TEST_F(ParseConfigTest, parserDefaultsD2Config) { /// @brief Check various invalid D2 client configurations. TEST_F(ParseConfigTest, invalidD2Config) { - std::string invalid_shortcuts[] = { - // Must supply at least enable-updates - "{ \"dhcp-ddns\" :" - " {" - " }" - "}", - // Enable-updates must be a boolean - "{ \"dhcp-ddns\" :" - " {" - " \"enable-updates\" : 0" - " }" - "}", - // stop - "" - }; - int i = 0; - while (!invalid_shortcuts[i].empty()) { - // Verify that the configuration string parsing throws - EXPECT_THROW(parseConfiguration(invalid_shortcuts[i]), - DhcpConfigError); - i++; - } - std::string invalid_configs[] = { // Must supply qualifying-suffix when updates are enabled "{ \"dhcp-ddns\" :" @@ -2036,7 +2013,7 @@ TEST_F(ParseConfigTest, invalidD2Config) { // Iterate through the invalid configuration strings, attempting to // parse each one. They should fail to parse, but fail gracefully. D2ClientConfigPtr current_config; - i = 0; + int i = 0; while (!invalid_configs[i].empty()) { // Verify that the configuration string parses without throwing. int rcode = parseConfiguration(invalid_configs[i]);