BIND 10 trac2499, updated. c4a5a733f2e6729f4d91bc7c1117f4ff0fa70e1c [2499] Move copyCheck back into ZoneLoaderTest fixture
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jan 21 07:57:15 UTC 2013
The branch, trac2499 has been updated
via c4a5a733f2e6729f4d91bc7c1117f4ff0fa70e1c (commit)
via f4a107a8f8775523e32d8ba0bc3e28e2f26eff3a (commit)
from c0b406791e7d3be3fb7962d52f6b6a320b4a7736 (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 c4a5a733f2e6729f4d91bc7c1117f4ff0fa70e1c
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Jan 21 13:26:44 2013 +0530
[2499] Move copyCheck back into ZoneLoaderTest fixture
commit f4a107a8f8775523e32d8ba0bc3e28e2f26eff3a
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Jan 21 13:26:30 2013 +0530
[2499] Pass zone origin as an argument to Iterator's constructor
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/tests/zone_loader_unittest.cc | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/zone_loader_unittest.cc b/src/lib/datasrc/tests/zone_loader_unittest.cc
index 2ca4cf5..c5dd202 100644
--- a/src/lib/datasrc/tests/zone_loader_unittest.cc
+++ b/src/lib/datasrc/tests/zone_loader_unittest.cc
@@ -79,8 +79,8 @@ public:
};
class Iterator : public ZoneIterator {
public:
- Iterator() :
- origin_("example.org"),
+ Iterator(const Name& origin) :
+ origin_(origin),
soa_(new RRset(origin_, RRClass::IN(), RRType::SOA(),
RRTTL(3600)))
{
@@ -125,7 +125,7 @@ public:
if (name != Name("example.org")) {
isc_throw(DataSourceError, "No such zone");
}
- return (ZoneIteratorPtr(new Iterator()));
+ return (ZoneIteratorPtr(new Iterator(Name("example.org"))));
}
virtual FindResult findZone(const Name& name) const {
const Name origin("example.org");
@@ -564,19 +564,17 @@ TEST_F(ZoneLoaderTest, copyCheckWarn) {
}
// Test there's validation of the data in the zone loader when copying
-// from another data source. Currently, this test doesn't require
-// creating a fixture as it uses almost nothing in existing fixtures.
-TEST(ZoneLoaderMockSourceTest, copyCheck) {
- // In this test, source_client provides a zone that does not
+// from another data source.
+TEST_F(ZoneLoaderTest, copyCheck) {
+ // In this test, my_source_client provides a zone that does not
// validate (no NS).
- MockClient source_client;
- MockClient destination_client;
- ZoneLoader loader(destination_client, Name("example.org"),
- source_client);
+ MockClient my_source_client;
+ ZoneLoader loader(destination_client_, Name("example.org"),
+ my_source_client);
EXPECT_THROW(loader.loadIncremental(10), ZoneContentError);
// The messages go to the log. We don't have an easy way to examine them.
- EXPECT_FALSE(destination_client.commit_called_);
+ EXPECT_FALSE(destination_client_.commit_called_);
}
}
More information about the bind10-changes
mailing list