BIND 10 master, updated. b31501e6a7d8cb5c1b3714f289d9c55753447d83 Merge branch 'trac867'

BIND 10 source code commits bind10-changes at lists.isc.org
Thu May 26 07:46:20 UTC 2011


The branch, master has been updated
       via  b31501e6a7d8cb5c1b3714f289d9c55753447d83 (commit)
       via  a3edee3da65d09f2b00256277ed8d8a608c9c627 (commit)
      from  c1d2bae691446b1fb44d3281092a7529f2f4f648 (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 b31501e6a7d8cb5c1b3714f289d9c55753447d83
Merge: c1d2bae691446b1fb44d3281092a7529f2f4f648 a3edee3da65d09f2b00256277ed8d8a608c9c627
Author: Jelte Jansen <jelte at isc.org>
Date:   Thu May 26 09:42:23 2011 +0200

    Merge branch 'trac867'

-----------------------------------------------------------------------

Summary of changes:
 src/bin/auth/auth_config.cc           |   14 ++++++++++++++
 src/bin/auth/tests/config_unittest.cc |    7 +++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_config.cc b/src/bin/auth/auth_config.cc
index 7929d80..2943cb5 100644
--- a/src/bin/auth/auth_config.cc
+++ b/src/bin/auth/auth_config.cc
@@ -60,6 +60,15 @@ private:
     set<string> configured_sources_;
 };
 
+/// A derived \c AuthConfigParser for the version value
+/// (which is not used at this moment)
+class VersionConfig : public AuthConfigParser {
+public:
+    VersionConfig() {}
+    virtual void build(ConstElementPtr) {};
+    virtual void commit() {};
+};
+
 void
 DatasourcesConfig::build(ConstElementPtr config_value) {
     BOOST_FOREACH(ConstElementPtr datasrc_elem, config_value->listValue()) {
@@ -293,6 +302,11 @@ createAuthConfigParser(AuthSrv& server, const std::string& config_id,
         // we may introduce dynamic registration of configuration parsers,
         // and then this test can be done in a cleaner and safer way.
         return (new ThrowerCommitConfig());
+    } else if (config_id == "version") {
+        // Currently, the version identifier is ignored, but it should
+        // later be used to mark backwards incompatible changes in the
+        // config data
+        return (new VersionConfig());
     } else {
         isc_throw(AuthConfigError, "Unknown configuration identifier: " <<
                   config_id);
diff --git a/src/bin/auth/tests/config_unittest.cc b/src/bin/auth/tests/config_unittest.cc
index 7658b84..0890c55 100644
--- a/src/bin/auth/tests/config_unittest.cc
+++ b/src/bin/auth/tests/config_unittest.cc
@@ -74,6 +74,13 @@ TEST_F(AuthConfigTest, databaseConfig) {
                             "{\"database_file\": \"should_be_ignored\"}")));
 }
 
+TEST_F(AuthConfigTest, versionConfig) {
+    // make sure it does not throw on 'version'
+    EXPECT_NO_THROW(configureAuthServer(
+                        server,
+                        Element::fromJSON("{\"version\": 0}")));
+}
+
 TEST_F(AuthConfigTest, exceptionGuarantee) {
     EXPECT_EQ(AuthSrv::MemoryDataSrcPtr(), server.getMemoryDataSrc(rrclass));
     // This configuration contains an invalid item, which will trigger




More information about the bind10-changes mailing list