BIND 10 trac2207, updated. e70da63e4aa5a075928c5cdef4fed11d15eeaa5a [2207] Tests for the zone updater

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Oct 11 17:12:43 UTC 2012


The branch, trac2207 has been updated
       via  e70da63e4aa5a075928c5cdef4fed11d15eeaa5a (commit)
      from  234026e024d6c4f35d2b7e1f34213949f79e614c (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 e70da63e4aa5a075928c5cdef4fed11d15eeaa5a
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Thu Oct 11 19:08:56 2012 +0200

    [2207] Tests for the zone updater
    
    Doesn't compile, there's no (not even empty) implementation of many
    methods of the updater.

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

Summary of changes:
 src/lib/datasrc/memory/zone_updater.h    |   21 +++++++++++++++++++--
 src/lib/datasrc/tests/memory/Makefile.am |    1 +
 2 files changed, 20 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/zone_updater.h b/src/lib/datasrc/memory/zone_updater.h
index cce07b9..9658866 100644
--- a/src/lib/datasrc/memory/zone_updater.h
+++ b/src/lib/datasrc/memory/zone_updater.h
@@ -79,7 +79,23 @@ public:
 // TODO: Fully define this. It is supposed to be passed to the install_action
 // callback, but what does it actually represent? Is it the actuall zone data
 // there?
-class ZoneSegment {};
+//
+// The current interface is temporary, so the tests work. It will probably
+// change (and we may even fold this class to some other, because there
+// seem to be too many classes around holding zone already).
+//
+// FIXME: Who is responsible for releasing of the segment itself?
+class ZoneSegment {
+public:
+    explicit ZoneSegment(ZoneData* data) :
+        data_(data)
+    {}
+    ZoneData* getZoneData() {
+        return (data_);
+    }
+private:
+    ZoneData* data_;
+};
 // TODO: Somehow specify what the ID is
 class ZoneSegmentID {};
 
@@ -98,7 +114,8 @@ typedef boost::function<void(ZoneData*)> LoadAction;
 ///
 /// Upon successful completion, the ownership of the new zone is passed
 /// to the callback and the old to the updater.
-typedef boost::function<ZoneData* (ZoneSegmentID, ZoneSegment*)> InstallAction;
+typedef boost::function<ZoneData* (const ZoneSegmentID&,
+                                   ZoneSegment*)> InstallAction;
 
 /// \brief Updater implementation which loads data locally.
 ///
diff --git a/src/lib/datasrc/tests/memory/Makefile.am b/src/lib/datasrc/tests/memory/Makefile.am
index 37e9043..ba922a6 100644
--- a/src/lib/datasrc/tests/memory/Makefile.am
+++ b/src/lib/datasrc/tests/memory/Makefile.am
@@ -33,6 +33,7 @@ run_unittests_SOURCES += memory_segment_test.h
 run_unittests_SOURCES += segment_object_holder_unittest.cc
 run_unittests_SOURCES += memory_client_unittest.cc
 run_unittests_SOURCES += zone_table_segment_unittest.cc
+run_unittests_SOURCES += zone_updater_unittest.cc
 
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_LDFLAGS  = $(AM_LDFLAGS)  $(GTEST_LDFLAGS)



More information about the bind10-changes mailing list