Browse Source

[5145b] And D2 client config short cut unit tests

Francis Dupont 8 years ago
parent
commit
f15dee7054
1 changed files with 1 additions and 24 deletions
  1. 1 24
      src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc

+ 1 - 24
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]);