Commit b2cb1e1e authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2203] renamed datasrc_configurator to datasrc_config; it represents it better.

parent 4da98b69
......@@ -55,7 +55,7 @@ b10_auth_SOURCES += auth_config.cc auth_config.h
b10_auth_SOURCES += command.cc command.h
b10_auth_SOURCES += common.h common.cc
b10_auth_SOURCES += statistics.cc statistics.h
b10_auth_SOURCES += datasrc_configurator.h datasrc_configurator.cc
b10_auth_SOURCES += datasrc_config.h datasrc_config.cc
b10_auth_SOURCES += main.cc
nodist_b10_auth_SOURCES = auth_messages.h auth_messages.cc
......
......@@ -17,7 +17,7 @@ query_bench_SOURCES += ../auth_srv.h ../auth_srv.cc
query_bench_SOURCES += ../auth_config.h ../auth_config.cc
query_bench_SOURCES += ../statistics.h ../statistics.cc
query_bench_SOURCES += ../auth_log.h ../auth_log.cc
query_bench_SOURCES += ../datasrc_configurator.h ../datasrc_configurator.cc
query_bench_SOURCES += ../datasrc_config.h ../datasrc_config.cc
nodist_query_bench_SOURCES = ../auth_messages.h ../auth_messages.cc
......
......@@ -30,7 +30,7 @@
#include <auth/auth_srv.h>
#include <auth/auth_config.h>
#include <auth/datasrc_configurator.h>
#include <auth/datasrc_config.h>
#include <auth/query.h>
#include <asiodns/asiodns.h>
......
......@@ -14,7 +14,7 @@
#include <cc/data.h>
#include "auth_srv.h"
#include "datasrc_configurator.h"
#include "datasrc_config.h"
// This is a trivial specialization for the commonly used version.
// Defined in .cc to avoid accidental creation of multiple copies.
......
......@@ -12,8 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef DATASRC_CONFIGURATOR_H
#define DATASRC_CONFIGURATOR_H
#ifndef DATASRC_CONFIG_H
#define DATASRC_CONFIG_H
#include "auth_srv.h"
......@@ -108,12 +108,12 @@ configureDataSourceGeneric(Server& server,
}
}
/// \brief Concrete version of DataSourceConfiguratorGeneric for the
/// \brief Concrete version of configureDataSource() for the
/// use with authoritative server implementation.
void
configureDataSource(AuthSrv& server, const isc::data::ConstElementPtr& config);
#endif
#endif // DATASRC_CONFIG_H
// Local Variables:
// mode: c++
......
......@@ -34,7 +34,7 @@
#include <auth/command.h>
#include <auth/auth_srv.h>
#include <auth/auth_log.h>
#include <auth/datasrc_configurator.h>
#include <auth/datasrc_config.h>
#include <asiodns/asiodns.h>
#include <asiolink/asiolink.h>
#include <log/logger_support.h>
......
......@@ -42,7 +42,7 @@ run_unittests_SOURCES += ../auth_config.h ../auth_config.cc
run_unittests_SOURCES += ../command.h ../command.cc
run_unittests_SOURCES += ../common.h ../common.cc
run_unittests_SOURCES += ../statistics.h ../statistics.cc
run_unittests_SOURCES += ../datasrc_configurator.h ../datasrc_configurator.cc
run_unittests_SOURCES += ../datasrc_config.h ../datasrc_config.cc
run_unittests_SOURCES += datasrc_util.h datasrc_util.cc
run_unittests_SOURCES += auth_srv_unittest.cc
run_unittests_SOURCES += config_unittest.cc
......@@ -51,7 +51,7 @@ run_unittests_SOURCES += command_unittest.cc
run_unittests_SOURCES += common_unittest.cc
run_unittests_SOURCES += query_unittest.cc
run_unittests_SOURCES += statistics_unittest.cc
run_unittests_SOURCES += datasrc_configurator_unittest.cc
run_unittests_SOURCES += datasrc_config_unittest.cc
run_unittests_SOURCES += run_unittests.cc
nodist_run_unittests_SOURCES = ../auth_messages.h ../auth_messages.cc
......
......@@ -36,7 +36,7 @@
#include <auth/command.h>
#include <auth/common.h>
#include <auth/statistics.h>
#include <auth/datasrc_configurator.h>
#include <auth/datasrc_config.h>
#include <util/unittests/mock_socketsession.h>
#include <util/threads/lock.h>
......
......@@ -19,7 +19,7 @@
#include <auth/auth_srv.h>
#include <auth/auth_config.h>
#include <auth/command.h>
#include <auth/datasrc_configurator.h>
#include <auth/datasrc_config.h>
#include <dns/name.h>
#include <dns/rrclass.h>
......
......@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <auth/datasrc_configurator.h>
#include <auth/datasrc_config.h>
#include <config/tests/fake_session.h>
#include <config/ccsession.h>
......@@ -35,7 +35,7 @@ using namespace boost;
namespace {
class DatasrcConfiguratorTest;
class DatasrcConfigTest;
class FakeList {
public:
......@@ -61,17 +61,16 @@ private:
typedef shared_ptr<FakeList> ListPtr;
void
testConfigureDataSource(DatasrcConfiguratorTest& test,
testConfigureDataSource(DatasrcConfigTest& test,
const isc::data::ConstElementPtr& config)
{
// We use the test fixture for the Server type. This makes it possible
// to easily fake all needed methods and look that they were called.
configureDataSourceGeneric<DatasrcConfiguratorTest, FakeList>(test,
config);
configureDataSourceGeneric<DatasrcConfigTest, FakeList>(test, config);
}
void
datasrcConfigHandler(DatasrcConfiguratorTest* fake_server, const std::string&,
datasrcConfigHandler(DatasrcConfigTest* fake_server, const std::string&,
isc::data::ConstElementPtr config,
const isc::config::ConfigData&)
{
......@@ -80,7 +79,7 @@ datasrcConfigHandler(DatasrcConfiguratorTest* fake_server, const std::string&,
}
}
class DatasrcConfiguratorTest : public ::testing::Test {
class DatasrcConfigTest : public ::testing::Test {
public:
// These pretend to be the server
ListPtr getClientList(const RRClass& rrclass) {
......@@ -104,7 +103,7 @@ public:
return (mutex_);
}
protected:
DatasrcConfiguratorTest() :
DatasrcConfigTest() :
session(ElementPtr(new ListElement), ElementPtr(new ListElement),
ElementPtr(new ListElement)),
specfile(string(TEST_OWN_DATA_DIR) + "/spec.spec")
......@@ -162,11 +161,11 @@ protected:
};
// Push there a configuration with a single list.
TEST_F(DatasrcConfiguratorTest, createList) {
TEST_F(DatasrcConfigTest, createList) {
initializeINList();
}
TEST_F(DatasrcConfiguratorTest, modifyList) {
TEST_F(DatasrcConfigTest, modifyList) {
// First, initialize the list
initializeINList();
// And now change the configuration of the list
......@@ -184,7 +183,7 @@ TEST_F(DatasrcConfiguratorTest, modifyList) {
}
// Check we can have multiple lists at once
TEST_F(DatasrcConfiguratorTest, multiple) {
TEST_F(DatasrcConfigTest, multiple) {
const ElementPtr
config(buildConfig("{\"IN\": [{\"type\": \"yyy\"}], "
"\"CH\": [{\"type\": \"xxx\"}]}"));
......@@ -204,7 +203,7 @@ TEST_F(DatasrcConfiguratorTest, multiple) {
//
// It's almost like above, but we initialize first with single-list
// config.
TEST_F(DatasrcConfiguratorTest, updateAdd) {
TEST_F(DatasrcConfigTest, updateAdd) {
initializeINList();
const ElementPtr
config(buildConfig("{\"IN\": [{\"type\": \"yyy\"}], "
......@@ -222,7 +221,7 @@ TEST_F(DatasrcConfiguratorTest, updateAdd) {
}
// We delete a class list in this test.
TEST_F(DatasrcConfiguratorTest, updateDelete) {
TEST_F(DatasrcConfigTest, updateDelete) {
initializeINList();
const ElementPtr
config(buildConfig("{}"));
......@@ -239,7 +238,7 @@ TEST_F(DatasrcConfiguratorTest, updateDelete) {
}
// Check that we can rollback an addition if something else fails
TEST_F(DatasrcConfiguratorTest, rollbackAddition) {
TEST_F(DatasrcConfigTest, rollbackAddition) {
initializeINList();
// The configuration is wrong. However, the CH one will get done first.
const ElementPtr
......@@ -258,7 +257,7 @@ TEST_F(DatasrcConfiguratorTest, rollbackAddition) {
}
// Check that we can rollback a deletion if something else fails
TEST_F(DatasrcConfiguratorTest, rollbackDeletion) {
TEST_F(DatasrcConfigTest, rollbackDeletion) {
initializeINList();
// Put the CH there
const ElementPtr
......@@ -279,7 +278,7 @@ TEST_F(DatasrcConfiguratorTest, rollbackDeletion) {
// Check that we can roll back configuration change if something
// fails later on.
TEST_F(DatasrcConfiguratorTest, rollbackConfiguration) {
TEST_F(DatasrcConfigTest, rollbackConfiguration) {
initializeINList();
// Put the CH there
const ElementPtr
......
Markdown is supported
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