Browse Source

[4097a] Added check of other options to Dhcp4ParserTest.optionDataDefaultsGlobal

Francis Dupont 9 years ago
parent
commit
52887c0ca1
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/bin/dhcp4/tests/config_parser_unittest.cc

+ 6 - 0
src/bin/dhcp4/tests/config_parser_unittest.cc

@@ -1887,6 +1887,12 @@ TEST_F(Dhcp4ParserTest, optionDataDefaultsGlobal) {
         0x01
     };
     testOption(*range.first, 23, foo2_expected, sizeof(foo2_expected));
+
+    // Check that options with other option codes are not returned.
+    for (uint8_t code = 24; code < 35; ++code) {
+        range = idx.equal_range(code);
+        EXPECT_EQ(0, std::distance(range.first, range.second));
+    }
 }
 
 // Goal of this test is to verify that subnet option data is configured