-// Copyright (C) 2013-2020 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2021 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
" \"use-conflict-resolution\" : true "
"}";
- const char* dhcids[] = { "111111", "222222", "333333", "444444"};
+ const char* dhcids[] = { "111111", "222222", "333333", "444444" };
canned_count_ = 4;
for (int i = 0; i < canned_count_; i++) {
dhcp_ddns::NameChangeRequestPtr ncr = NameChangeRequest::
"\"port\" : 88 , "
"\"tsig-keys\": [] ,"
"\"forward-ddns\" : {"
- "\"ddns-domains\": [ "
- "{ \"name\": \"example.com.\" , "
- " \"dns-servers\" : [ "
- " { \"ip-address\": \"127.0.0.1\", \"port\" : 5301 } "
- " ] },"
- "{ \"name\": \"org.\" , "
- " \"dns-servers\" : [ "
- " { \"ip-address\": \"127.0.0.1\" } "
+ " \"ddns-domains\": [ "
+ " { \"name\": \"example.com.\" , "
+ " \"dns-servers\" : [ "
+ " { \"ip-address\": \"127.0.0.1\", \"port\" : 5301 } "
+ " ] },"
+ " { \"name\": \"org.\" , "
+ " \"dns-servers\" : [ "
+ " { \"ip-address\": \"127.0.0.1\" } "
+ " ] }"
" ] }, "
- "] }, "
"\"reverse-ddns\" : { "
- "\"ddns-domains\": [ "
- "{ \"name\": \"1.168.192.in-addr.arpa.\" , "
- " \"dns-servers\" : [ "
- " { \"ip-address\": \"127.0.0.1\", \"port\" : 5301 } "
- " ] }, "
- "{ \"name\": \"2.0.3.0.8.B.D.0.1.0.0.2.ip6.arpa.\" , "
- " \"dns-servers\" : [ "
- " { \"ip-address\": \"127.0.0.1\" } "
- " ] } "
- "] } }";
+ " \"ddns-domains\": [ "
+ " { \"name\": \"1.168.192.in-addr.arpa.\" , "
+ " \"dns-servers\" : [ "
+ " { \"ip-address\": \"127.0.0.1\", \"port\" : 5301 } "
+ " ] }, "
+ " { \"name\": \"2.0.3.0.8.B.D.0.1.0.0.2.ip6.arpa.\" , "
+ " \"dns-servers\" : [ "
+ " { \"ip-address\": \"127.0.0.1\" } "
+ " ] } "
+ " ] } }";
// If this configuration fails to parse most tests will fail.
ASSERT_TRUE(fromJSON(canned_config_));
"name" : "first.key",
"algorithm" : "HMAC-MD5",
"secret" : "LSWXnfkKZjdPJI5QxlpnfQ=="
- }
- ,{
+ },
+ {
"name" : "first.key",
"algorithm" : "HMAC-MD5",
"secret" : "LSWXnfkKZjdPJI5QxlpnfQ=="
"algorithm" : "HMAC-MD5",
"digest-bits" : 72,
"secret" : "LSWXnfkKZjdPJI5QxlpnfQ=="
- },
+ }
]
}
}
"algorithm" : "HMAC-SHA1",
"digest-bits" : 72,
"secret" : "hRrp29wzUv3uzSNRLlY68w=="
- },
+ }
]
}
}
"algorithm" : "HMAC-SHA224",
"digest-bits" : 104,
"secret" : "bZEG7Ow8OgAUPfLWV3aAUQ=="
- },
+ }
]
}
}
"algorithm" : "hmac-sha256",
"digest-bits" : 120,
"secret" : "bjF4hYhTfQ5MX0siagelsw=="
- },
+ }
]
}
}
"algorithm" : "hmac-sha384",
"digest-bits" : 184,
"secret" : "Gwk53fvy3CmbupoI9TgigA=="
- },
+ }
]
}
}
" \"assigned-addresses\", \"declined-addresses\"\n"
" ],\n"
" \"rows\": [\n"
- " [ 20, 16, 10, 3, 0 ],\n"
+ " [ 20, 16, 10, 3, 0 ]\n"
" ],\n"
" \"timestamp\": \"2018-05-04 15:03:37.000000\" }\n"
"}\n"
" \"rows\": [\n"
" [ 10, 256, 300, 2, 3 ],\n"
" [ 20, 16, 10, 3, 0 ],\n"
- " [ 30, 256, 0, 0, 0 ],\n"
+ " [ 30, 256, 0, 0, 0 ]\n"
" ],\n"
" \"timestamp\": \"2018-05-04 15:03:37.000000\" }\n"
"}\n"
" \"rows\": [\n"
" [ 20, 16, 10, 3, 0 ],\n"
" [ 30, 256, 0, 0, 0 ],\n"
- " [ 40, 16, 4, 4, 0 ],\n"
+ " [ 40, 16, 4, 4, 0 ]\n"
" ],\n"
" \"timestamp\": \"2018-05-04 15:03:37.000000\" }\n"
"}\n"
" \"rows\": [\n"
" [ 30, 256, 0, 0, 0 ],\n"
" [ 40, 16, 4, 4, 0 ],\n"
- " [ 50, 256, 2, 1, 1 ],\n"
+ " [ 50, 256, 2, 1, 1 ]\n"
" ],\n"
" \"timestamp\": \"2018-05-04 15:03:37.000000\" }\n"
"}\n"
" ],\n"
" \"rows\": [\n"
" [ 30, 256, 0, 0, 0 ],\n"
- " [ 40, 16, 4, 4, 0 ],\n"
+ " [ 40, 16, 4, 4, 0 ]\n"
" ],\n"
" \"timestamp\": \"2018-05-04 15:03:37.000000\" }\n"
"}\n"
" \"rows\": [\n"
" [ 10, 65536, 10000, 2, 3, 0, 0, 0 ],\n"
" [ 20, 16777216, 10, 3, 0, 0, 0, 0 ],\n"
- " [ 30, 16, 2, 1, 1, 65536, 4, 3 ],\n"
+ " [ 30, 16, 2, 1, 1, 65536, 4, 3 ]\n"
" ],\n"
" \"timestamp\": \"2018-05-04 15:03:37.000000\" }\n"
"}\n"
(*test).exp_response_, (*test).exp_result_json);
}
}
-
}
-
-
} // end of anonymous namespace
-// Copyright (C) 2009-2020 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009-2021 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
// some json specific format tests, here the str() output is
// different from the string input
- EXPECT_EQ("100", Element::fromJSON("+100")->str());
+ // +100 is incorrect according to the ECMA 404 JSON standard.
+ // Keeping it as it will be reversed.
+ // EXPECT_EQ("100", Element::fromJSON("+100")->str());
EXPECT_EQ("100.0", Element::fromJSON("1e2")->str());
EXPECT_EQ("100.0", Element::fromJSON("+1e2")->str());
EXPECT_EQ("-100.0", Element::fromJSON("-1e2")->str());
"\"consistency\": \"quorum\", \n"
"\"on-fail\": \"stop-retry-exit\", \n"
"\"serial-consistency\": \"serial\", \n"
- "\"host\": \"host_str\", \n"
"\"keyspace\": \"keyspace_str\", \n"
"\"lfc-interval\" : 100, \n"
"\"host\": \"whatevah\", \n"
std::string header6 = "{\n\"Dhcp6\": {\n";
std::string defaults = "\"decline-probation-period\": 0,\n";
- defaults += "\"dhcp4o6-port\": 0,\n";
defaults += "\"interfaces-config\": { \"interfaces\": [ ],\n";
defaults += " \"re-detect\": false },\n";
defaults += "\"option-def\": [ ],\n";
defaults += conf.getD2ClientConfig()->toElement()->str() + ",\n";
- std::string defaults4 = "\"echo-client-id\": true,\n";
- defaults4 += "\"shared-networks\": [ ],\n";
+ std::string defaults4 = "\"shared-networks\": [ ],\n";
defaults4 += "\"subnet4\": [ ],\n";
defaults4 += "\"host-reservation-identifiers\": ";
defaults4 += "[ \"hw-address\", \"duid\", \"circuit-id\", \"client-id\" ],\n";
-// Copyright (C) 2014-2019,2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-2021 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
// Verifies that a valid output option,'pattern' paress correctly.
TEST_F(LoggingTest, validPattern) {
+ // Note the backslash must be doubled in the pattern definition.
const char* config_txt =
"{ \"loggers\": ["
" {"
" \"output_options\": ["
" {"
" \"output\": \"stdout\","
- " \"pattern\": \"mylog %m\n\""
+ " \"pattern\": \"mylog %m\\n\""
" }"
" ],"
" \"severity\": \"INFO\""