Commit 34565a28 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2216] updated data source configuration using the new API

parent eeeace34
......@@ -30,6 +30,7 @@
#include <auth/auth_srv.h>
#include <auth/auth_config.h>
#include <auth/datasrc_configurator.h>
#include <auth/query.h>
#include <asiodns/asiodns.h>
......@@ -124,8 +125,13 @@ public:
OutputBuffer& buffer) :
QueryBenchMark(queries, query_message, buffer)
{
server_->updateConfig(Element::fromJSON("{\"database_file\": \"" +
string(datasrc_file) + "\"}"));
DataSourceConfigurator::testReconfigure(
server_.get(),
Element::fromJSON("{\"IN\":"
" [{\"type\": \"sqlite3\","
" \"params\": {"
" \"database_file\": \"" +
string(datasrc_file) + "\"}}]}"));
}
};
......@@ -138,14 +144,14 @@ public:
OutputBuffer& buffer) :
QueryBenchMark(queries, query_message, buffer)
{
configureAuthServer(*server_,
Element::fromJSON(
"{\"datasources\": "
" [{\"type\": \"memory\","
" \"zones\": [{\"origin\": \"" +
string(zone_origin) + "\","
" \"file\": \"" +
string(zone_file) + "\"}]}]}"));
DataSourceConfigurator::testReconfigure(
server_.get(),
Element::fromJSON("{\"IN\":"
" [{\"type\": \"MasterFiles\","
" \"cache-enable\": true, "
" \"params\": {\"" +
string(zone_origin) + "\": \"" +
string(zone_file) + "\"}}]}"));
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment