]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Final changes from 5374 merge
authorFrancis Dupont <fdupont@isc.org>
Wed, 11 Apr 2018 19:20:08 +0000 (21:20 +0200)
committerFrancis Dupont <fdupont@isc.org>
Wed, 11 Apr 2018 19:20:08 +0000 (21:20 +0200)
src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp4/tests/get_config_unittest.cc.skel
src/bin/dhcp6/tests/get_config_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc.skel
src/lib/dhcpsrv/tests/host_unittest.cc

index a83e6a9915bfa16a6835eb3bafade597e40da746..6cca3383df85ffb456d0ca8f77496e7be2ee3e3d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -6331,7 +6331,7 @@ const char* UNPARSED_CONFIGS[] = {
 "            },\n"
 "            {\n"
 "                \"boot-file-name\": \"\",\n"
-"                \"name\": \"three\",\n"
+"                \"name\": \"two\",\n"
 "                \"next-server\": \"0.0.0.0\",\n"
 "                \"option-data\": [ ],\n"
 "                \"option-def\": [ ],\n"
@@ -6339,7 +6339,7 @@ const char* UNPARSED_CONFIGS[] = {
 "            },\n"
 "            {\n"
 "                \"boot-file-name\": \"\",\n"
-"                \"name\": \"two\",\n"
+"                \"name\": \"three\",\n"
 "                \"next-server\": \"0.0.0.0\",\n"
 "                \"option-data\": [ ],\n"
 "                \"option-def\": [ ],\n"
@@ -6777,24 +6777,24 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"test\": \"'' == ''\"\n"
 "            },\n"
 "            {\n"
-"                \"comment\": \"a comment\",\n"
 "                \"boot-file-name\": \"\",\n"
-"                \"name\": \"both\",\n"
+"                \"name\": \"none\",\n"
 "                \"next-server\": \"0.0.0.0\",\n"
 "                \"option-data\": [ ],\n"
 "                \"option-def\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
-"                \"user-context\": {\n"
-"                    \"version\": 1\n"
-"                }\n"
+"                \"server-hostname\": \"\"\n"
 "            },\n"
 "            {\n"
+"                \"comment\": \"a comment\",\n"
 "                \"boot-file-name\": \"\",\n"
-"                \"name\": \"none\",\n"
+"                \"name\": \"both\",\n"
 "                \"next-server\": \"0.0.0.0\",\n"
 "                \"option-data\": [ ],\n"
 "                \"option-def\": [ ],\n"
-"                \"server-hostname\": \"\"\n"
+"                \"server-hostname\": \"\",\n"
+"                \"user-context\": {\n"
+"                    \"version\": 1\n"
+"                }\n"
 "            }\n"
 "        ],\n"
 "        \"control-socket\": {\n"
index 0f764b31fcfdb8a2e30a88adc05091b5330d7833..61934f3162a5001d63bd6693233b956cd2fbda0d 100644 (file)
@@ -347,7 +347,9 @@ TEST_P(Dhcp4GetConfigTest, run) {
 class IntToString {
 public:
     std::string operator()(const testing::TestParamInfo<size_t>& n) {
-        return to_string(n.param);
+        std::ostringstream ss;
+        ss << static_cast<size_t>(n.param);
+        return (ss.str());
     }
 };
 
index ee15fc3483531187dc4ed49468c72d33b59992be..5f3ddccdd6b9fee714d6e862905084a343135a29 100644 (file)
@@ -6340,16 +6340,16 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"test\": \"'' == ''\"\n"
 "            },\n"
 "            {\n"
+"                \"name\": \"none\",\n"
+"                \"option-data\": [ ]\n"
+"            },\n"
+"            {\n"
 "                \"comment\": \"a comment\",\n"
 "                \"name\": \"both\",\n"
 "                \"option-data\": [ ],\n"
 "                \"user-context\": {\n"
 "                    \"version\": 1\n"
 "                }\n"
-"            },\n"
-"            {\n"
-"                \"name\": \"none\",\n"
-"                \"option-data\": [ ]\n"
 "            }\n"
 "        ],\n"
 "        \"control-socket\": {\n"
index 3ac9a3216a3701957608b39e96fe70758fb0717a..5ed9352ef63496ee2fe24a465580d74de262015a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -351,7 +351,9 @@ TEST_P(Dhcp6GetConfigTest, run) {
 class IntToString {
 public:
     std::string operator()(const testing::TestParamInfo<size_t>& n) {
-        return to_string(n.param);
+        std::ostringstream ss;
+        ss << static_cast<size_t>(n.param);
+        return (ss.str());
     }
 };
 
index 79871774db27223557be6166ad66b96e539970bf..674bca8009429f8c5210fca91565afe1a2826dd2 100644 (file)
@@ -1169,6 +1169,7 @@ TEST_F(HostTest, unparse) {
               "}",
               host->toElement6()->str());
 
+    // Now the classes are in defined order (vs. alphabetical order).
     host->addClientClass6("hub");
     host->addClientClass6("device");
 
@@ -1184,7 +1185,7 @@ TEST_F(HostTest, unparse) {
               host->toElement4()->str());
 
     EXPECT_EQ("{ "
-              "\"client-classes\": [ \"device\", \"hub\" ], "
+              "\"client-classes\": [ \"hub\", \"device\" ], "
               "\"duid\": \"11:12:13:14:15\", "
               "\"hostname\": \"myhost\", "
               "\"ip-addresses\": [  ], "