BIND 10 trac1207, updated. 2a57f8bbd3c0b7fff3b5ee1f95c83c3435daa2c7 [1207] several small cleanups
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue May 8 11:01:41 UTC 2012
The branch, trac1207 has been updated
via 2a57f8bbd3c0b7fff3b5ee1f95c83c3435daa2c7 (commit)
from 17eb0c775e8242e4b7eb7b531bb97b9519e4ef1f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2a57f8bbd3c0b7fff3b5ee1f95c83c3435daa2c7
Author: Jelte Jansen <jelte at isc.org>
Date: Tue May 8 13:01:26 2012 +0200
[1207] several small cleanups
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/auth_config.cc | 3 ++-
src/bin/auth/auth_srv.cc | 1 -
src/bin/auth/auth_srv.h | 2 +-
src/bin/auth/tests/command_unittest.cc | 7 +++----
src/bin/auth/tests/config_unittest.cc | 1 -
src/lib/datasrc/tests/client_unittest.cc | 4 ++++
6 files changed, 10 insertions(+), 8 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_config.cc b/src/bin/auth/auth_config.cc
index 29ed925..afb606d 100644
--- a/src/bin/auth/auth_config.cc
+++ b/src/bin/auth/auth_config.cc
@@ -145,7 +145,8 @@ MemoryDatasourceConfig::build(ConstElementPtr config_value) {
// We'd eventually optimize building zones (in case of reloading) by
// selectively loading fresh zones. Right now we simply check the
- // RR class is supported by the server implementation.
+ // RR class is supported by the server implementation, by calling
+ // the get (it should throw on the wrong class).
(void)server_.getInMemoryClientContainer(rrclass_);
memory_client_ = isc::datasrc::DataSourceClientContainerPtr(
new isc::datasrc::DataSourceClientContainer("memory", config_value));
diff --git a/src/bin/auth/auth_srv.cc b/src/bin/auth/auth_srv.cc
index 557c3f1..898a126 100644
--- a/src/bin/auth/auth_srv.cc
+++ b/src/bin/auth/auth_srv.cc
@@ -432,7 +432,6 @@ AuthSrv::setInMemoryClient(const isc::dns::RRClass& rrclass,
impl_->memory_client_container_ = memory_client;
}
-
uint32_t
AuthSrv::getStatisticsTimerInterval() const {
return (impl_->statistics_timer_.getInterval() / 1000);
diff --git a/src/bin/auth/auth_srv.h b/src/bin/auth/auth_srv.h
index 50f1f54..893421e 100644
--- a/src/bin/auth/auth_srv.h
+++ b/src/bin/auth/auth_srv.h
@@ -286,7 +286,7 @@ public:
///
/// If there is already an in memory data source configured, it will be
/// replaced with the newly specified one.
- /// \c memory_datasrc can be an empty shared pointer, in which case it
+ /// \c memory_client can be an empty shared pointer, in which case it
/// will (re)disable the in-memory data source.
///
/// \param rrclass The RR class of the in-memory data source to be set.
diff --git a/src/bin/auth/tests/command_unittest.cc b/src/bin/auth/tests/command_unittest.cc
index a287269..24c7dc3 100644
--- a/src/bin/auth/tests/command_unittest.cc
+++ b/src/bin/auth/tests/command_unittest.cc
@@ -247,7 +247,7 @@ TEST_F(AuthCommandTest, loadZone) {
Element::fromJSON(
"{\"origin\": \"test1.example\"}"));
checkAnswer(0);
- //newZoneChecks(server_);
+ newZoneChecks(server_);
}
// This test uses dynamic load of a data source module, and won't work when
@@ -295,7 +295,6 @@ TEST_F(AuthCommandTest,
// The loadzone command needs the zone to be already loaded, because
// it is used for reloading only
- //AuthSrv::InMemoryClientPtr dsrc(new InMemoryClient());
isc::datasrc::DataSourceClientContainerPtr dsrc(
new isc::datasrc::DataSourceClientContainer("memory",
Element::fromJSON("{\"type\": \"memory\"}")));
@@ -313,7 +312,7 @@ TEST_F(AuthCommandTest,
// Get the zone and look if there are data in it (the original one was
// empty)
- ASSERT_TRUE(server_.getInMemoryClientContainer(RRClass::IN()));
+ ASSERT_TRUE(server_.hasInMemoryClient());
EXPECT_EQ(ZoneFinder::SUCCESS, server_.getInMemoryClient(RRClass::IN())->
findZone(Name("example.org")).zone_finder->
find(Name("example.org"), RRType::SOA())->code);
@@ -377,7 +376,7 @@ TEST_F(AuthCommandTest,
module_session.setLocalConfig(broken);
checkAnswer(1);
// The previous zone is not hurt in any way
- EXPECT_EQ(ZoneFinder::SUCCESS, server_.getInMemoryClientContainer(RRClass::IN())->getInstance().
+ EXPECT_EQ(ZoneFinder::SUCCESS, server_.getInMemoryClient(RRClass::IN())->
findZone(Name("example.org")).zone_finder->
find(Name("example.org"), RRType::SOA())->code);
}
diff --git a/src/bin/auth/tests/config_unittest.cc b/src/bin/auth/tests/config_unittest.cc
index dcc8cf6..d5b9cdc 100644
--- a/src/bin/auth/tests/config_unittest.cc
+++ b/src/bin/auth/tests/config_unittest.cc
@@ -321,7 +321,6 @@ TEST_F(MemoryDatasrcConfigTest, exception) {
// the given master file should not exist
delete parser;
parser = createAuthConfigParser(server, "datasources");
-
EXPECT_THROW(parser->build(Element::fromJSON(
"[{\"type\": \"memory\","
" \"zones\": [{\"origin\": \"example.org\","
diff --git a/src/lib/datasrc/tests/client_unittest.cc b/src/lib/datasrc/tests/client_unittest.cc
index 64ad25f..87ab5e0 100644
--- a/src/lib/datasrc/tests/client_unittest.cc
+++ b/src/lib/datasrc/tests/client_unittest.cc
@@ -56,4 +56,8 @@ TEST_F(ClientTest, defaultIterator) {
EXPECT_THROW(client_.getIterator(Name(".")), isc::NotImplemented);
}
+TEST_F(ClientTest, defaultGetZoneCount) {
+ EXPECT_THROW(client_.getZoneCount(), isc::NotImplemented);
+}
+
}
More information about the bind10-changes
mailing list