]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5351] Regen tests
authorFrancis Dupont <fdupont@isc.org>
Wed, 29 Nov 2017 07:26:29 +0000 (08:26 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 29 Nov 2017 07:26:29 +0000 (08:26 +0100)
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp6/tests/config_parser_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc

index fcea2b5b0057a14ecde929fd65f8d13ca414e165..8f28f1ff2dd3beaeb8e25d7ef2a77b21af7822da 100644 (file)
@@ -5654,7 +5654,7 @@ TEST_F(Dhcp4ParserTest, comments) {
     OptionDefinitionPtr opt_def = LibDHCP::getRuntimeOptionDef("isc", 100);
     ASSERT_TRUE(opt_def);
     EXPECT_EQ("foo", opt_def->getName());
-    EXPECT_EQ(1, opt_def->getCode());
+    EXPECT_EQ(100, opt_def->getCode());
     EXPECT_FALSE(opt_def->getArrayType());
     EXPECT_EQ(OPT_IPV4_ADDRESS_TYPE, opt_def->getType());
     EXPECT_TRUE(opt_def->getEncapsulatedSpace().empty());
index 222edb15bfd4d419b99497fc50dc7cdf3fd7fd4c..adeabb72b666579251775dcdcae2a24c99a4649c 100644 (file)
@@ -1587,9 +1587,19 @@ const char* EXTRACTED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 58
 "{\n"
+"        \"comment\": \"A DHCPv4 server\",\n"
+"        \"option-def\": [\n"
+"            {\n"
+"                \"comment\": \"An option definition\",\n"
+"                \"code\": 100,\n"
+"                \"name\": \"foo\",\n"
+"                \"space\": \"isc\",\n"
+"                \"type\": \"ipv4-address\"\n"
+"            }\n"
+"        ],\n"
 "        \"shared-networks\": [\n"
 "            {\n"
-"                \"comment\": \"A shared-network\",\n"
+"                \"comment\": \"A shared network\",\n"
 "                \"name\": \"foo\",\n"
 "                \"subnet4\": [\n"
 "                    {\n"
@@ -6251,6 +6261,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 58
 "{\n"
+"        \"comment\": \"A DHCPv4 server\",\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"always-include-fqdn\": false,\n"
@@ -6288,10 +6299,21 @@ const char* UNPARSED_CONFIGS[] = {
 "            \"type\": \"memfile\"\n"
 "        },\n"
 "        \"option-data\": [ ],\n"
-"        \"option-def\": [ ],\n"
+"        \"option-def\": [\n"
+"            {\n"
+"                \"comment\": \"An option definition\",\n"
+"                \"array\": false,\n"
+"                \"code\": 100,\n"
+"                \"encapsulate\": \"\",\n"
+"                \"name\": \"foo\",\n"
+"                \"record-types\": \"\",\n"
+"                \"space\": \"isc\",\n"
+"                \"type\": \"ipv4-address\"\n"
+"            }\n"
+"        ],\n"
 "        \"shared-networks\": [\n"
 "            {\n"
-"                \"comment\": \"A shared-network\",\n"
+"                \"comment\": \"A shared network\",\n"
 "                \"match-client-id\": true,\n"
 "                \"name\": \"foo\",\n"
 "                \"option-data\": [ ],\n"
index 03ac7fdd40fa0d697d99399b97789282664cc58f..c81444f7690210580430cf8138cb1a12d07d0acf 100644 (file)
@@ -6104,7 +6104,7 @@ TEST_F(Dhcp6ParserTest, comments) {
     OptionDefinitionPtr opt_def = LibDHCP::getRuntimeOptionDef("isc", 100);
     ASSERT_TRUE(opt_def);
     EXPECT_EQ("foo", opt_def->getName());
-    EXPECT_EQ(1, opt_def->getCode());
+    EXPECT_EQ(100, opt_def->getCode());
     EXPECT_FALSE(opt_def->getArrayType());
     EXPECT_EQ(OPT_IPV6_ADDRESS_TYPE, opt_def->getType());
     EXPECT_TRUE(opt_def->getEncapsulatedSpace().empty());
index 22a3a81edea56c9e9be682c4ae42c136d5d05dcd..fb0d2bde29296db472ee41a24718ba166fdda333 100644 (file)
@@ -1462,9 +1462,19 @@ const char* EXTRACTED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 51
 "{\n"
+"        \"comment\": \"A DHCPv6 server\",\n"
+"        \"option-def\": [\n"
+"            {\n"
+"                \"comment\": \"An option definition\",\n"
+"                \"code\": 100,\n"
+"                \"name\": \"foo\",\n"
+"                \"space\": \"isc\",\n"
+"                \"type\": \"ipv6-address\"\n"
+"            }\n"
+"        ],\n"
 "        \"shared-networks\": [\n"
 "            {\n"
-"                \"comment\": \"A shared-network\",\n"
+"                \"comment\": \"A shared network\",\n"
 "                \"name\": \"foo\",\n"
 "                \"subnet6\": [\n"
 "                    {\n"
@@ -5862,6 +5872,7 @@ const char* UNPARSED_CONFIGS[] = {
 "    }\n",
     // CONFIGURATION 51
 "{\n"
+"        \"comment\": \"A DHCPv6 server\",\n"
 "        \"decline-probation-period\": 86400,\n"
 "        \"dhcp-ddns\": {\n"
 "            \"always-include-fqdn\": false,\n"
@@ -5899,7 +5910,18 @@ const char* UNPARSED_CONFIGS[] = {
 "        },\n"
 "        \"mac-sources\": [ \"any\" ],\n"
 "        \"option-data\": [ ],\n"
-"        \"option-def\": [ ],\n"
+"        \"option-def\": [\n"
+"            {\n"
+"                \"comment\": \"An option definition\",\n"
+"                \"array\": false,\n"
+"                \"code\": 100,\n"
+"                \"encapsulate\": \"\",\n"
+"                \"name\": \"foo\",\n"
+"                \"record-types\": \"\",\n"
+"                \"space\": \"isc\",\n"
+"                \"type\": \"ipv6-address\"\n"
+"            }\n"
+"        ],\n"
 "        \"relay-supplied-options\": [ \"65\" ],\n"
 "        \"server-id\": {\n"
 "            \"enterprise-id\": 0,\n"
@@ -5911,7 +5933,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        },\n"
 "        \"shared-networks\": [\n"
 "            {\n"
-"                \"comment\": \"A shared-network\",\n"
+"                \"comment\": \"A shared network\",\n"
 "                \"name\": \"foo\",\n"
 "                \"option-data\": [ ],\n"
 "                \"preferred-lifetime\": 0,\n"