Extend router alteration test

Extended the test to cover modifications to readconnroute as well as do
checks on detection of invalid parameters.

Also allowed modifications to router_options at runtime.
This commit is contained in:
Markus Mäkelä
2018-07-09 13:04:14 +03:00
parent c4be3f75c0
commit 6d663c79ac
2 changed files with 65 additions and 4 deletions

View File

@ -651,7 +651,8 @@ bool runtime_alter_service(SERVICE *service, const char* zKey, const char* zValu
valid = true;
serviceSetRetryOnFailure(service, value.c_str());
}
else if (config_param_is_valid(module->parameters, key.c_str(), value.c_str(), NULL))
else if (config_param_is_valid(module->parameters, key.c_str(), value.c_str(), NULL) ||
key == CN_ROUTER_OPTIONS)
{
if (service->router->configureInstance && service->capabilities & RCAP_TYPE_RUNTIME_CONFIG)
{
@ -1779,7 +1780,6 @@ static bool is_dynamic_param(const std::string& key)
{
return key != CN_TYPE &&
key != CN_ROUTER &&
key != CN_ROUTER_OPTIONS &&
key != CN_SERVERS;
}