std::string configs[] = {
"{}",
- "{ \"config-databases\": [] }",
+ "{ \"config-databases\": [] }",
"{ \"config-databases\": [ \n"
" { \n"
" \"user\":\"bob\", \n"
" \"password\":\"wonder\" \n"
" } \n"
- "] } \n"
+ "] } \n"
};
for (auto config : configs) {
// When the config is empty, ControlConfigInfo::toElement still
// generates a map with an empty db list. Replace source for
- // element comparison below.
+ // element comparison below.
if (source_elem->size() == 0) {
ASSERT_NO_THROW (source_elem = Element::fromJSON(
"{ \"config-databases\": [] }"));
TEST(ConfigCtlInfoParser, invalidConfigs) {
// Note that configurations are must be valid JSON, but invalid logically.
std::string configs[] = {
- "{ \"config-databases\": \"not_list\" }",
+ "{ \"config-databases\": \"not_list\" }",
"{ \"config-databases\": [ \n"
" { \n"
" \"bogus\": \"param\" \n"
" } \n"
- "] } \n"
+ "] } \n"
};
for (auto config : configs) {
" JSON error, test is broken: " << config;
// Parse the Elements into a ConfigControlInfo.
- ASSERT_THROW(parser.parse(source_elem), isc::ConfigError)
+ ASSERT_THROW(parser.parse(source_elem), isc::ConfigError)
<< "config: " << config;
}
}
};
const char* LoggingTest::TEST_LOG_NAME = "kea.test.log";
-const int LoggingTest::TEST_MAX_SIZE = 204800; // Smallest without disabling rotation
+const int LoggingTest::TEST_MAX_SIZE = 204800; // Smallest without disabling rotation
const int LoggingTest::TEST_MAX_VERS = 2; // More than the default of 1
// Checks that the constructor is able to process specified storage properly.