BIND 10 trac2421, updated. 49d6a081b5e38e6ac463e71ae4daac8c6c4829d7 [2421] Add unit tests for broken zones during configure()
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Nov 15 05:53:44 UTC 2012
The branch, trac2421 has been updated
via 49d6a081b5e38e6ac463e71ae4daac8c6c4829d7 (commit)
from 4bc7823ddb3d480a7e3ff259722832cee64bec22 (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 49d6a081b5e38e6ac463e71ae4daac8c6c4829d7
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 15 11:06:17 2012 +0530
[2421] Add unit tests for broken zones during configure()
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/tests/client_list_unittest.cc | 8 ++++++++
src/lib/datasrc/tests/testdata/example.edu-broken | 11 +++++++++++
.../lib/datasrc/tests/testdata}/example.net-empty | 0
3 files changed, 19 insertions(+)
create mode 100644 src/lib/datasrc/tests/testdata/example.edu-broken
copy {tests/lettuce/data => src/lib/datasrc/tests/testdata}/example.net-empty (100%)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/client_list_unittest.cc b/src/lib/datasrc/tests/client_list_unittest.cc
index d1ff852..31e27af 100644
--- a/src/lib/datasrc/tests/client_list_unittest.cc
+++ b/src/lib/datasrc/tests/client_list_unittest.cc
@@ -838,16 +838,24 @@ TEST_F(ListTest, BadMasterFile) {
" \"cache-enable\": true,"
" \"params\": {"
" \"example.com.\": \"" TEST_DATA_DIR "/example.com.flattened\","
+ " \"example.net.\": \"" TEST_DATA_DIR "/example.net-empty\","
+ " \"example.edu.\": \"" TEST_DATA_DIR "/example.edu-broken\","
+ " \"example.info.\": \"" TEST_DATA_DIR "/example.info-nonexist\","
" \"foo.bar.\": \"" TEST_DATA_DIR "/example.org.nsec3-signed\","
" \".\": \"" TEST_DATA_DIR "/root.zone\""
" }"
"}]"));
+
+ // this should not throw even if there are any zone loading errors.
list_->configure(elem, true);
positiveResult(list_->find(Name("example.com."), true), ds_[0],
Name("example.com."), true, "example.com", true);
EXPECT_TRUE(negative_result_ == list_->find(Name("example.org."), true));
EXPECT_TRUE(negative_result_ == list_->find(Name("foo.bar"), true));
+ EXPECT_TRUE(negative_result_ == list_->find(Name("example.net."), true));
+ EXPECT_TRUE(negative_result_ == list_->find(Name("example.edu."), true));
+ EXPECT_TRUE(negative_result_ == list_->find(Name("example.info."), true));
positiveResult(list_->find(Name(".")), ds_[0], Name("."), true, "root",
true);
}
diff --git a/src/lib/datasrc/tests/testdata/example.edu-broken b/src/lib/datasrc/tests/testdata/example.edu-broken
new file mode 100644
index 0000000..dde11cf
--- /dev/null
+++ b/src/lib/datasrc/tests/testdata/example.edu-broken
@@ -0,0 +1,11 @@
+example.edu. 3600 IN SOA ns1.example.edu. admin.example.edu. 1234 3600 1800 2419200 7200
+example.edu. 3600 IN NS ns1.example.edu.
+example.edu. 3600 IN NS ns2.example.edu.
+example.edu. 3600 IN MX 10 mail.example.edu.
+www.example.edu. 3600 IN A 192.0.2.1
+ns1.example.edu. 3600 IN A 192.0.2.3
+ns2.example.edu. 3600 IN A 192.0.2.4
+
+;; DNAME + NS (non-apex) throws ZoneDataUpdater::AddError
+ns1.example.edu. 3600 IN DNAME foo.example.edu.
+ns1.example.edu. 3600 IN NS bar.example.edu.
diff --git a/src/lib/datasrc/tests/testdata/example.net-empty b/src/lib/datasrc/tests/testdata/example.net-empty
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/lib/datasrc/tests/testdata/example.net-empty
@@ -0,0 +1 @@
+
More information about the bind10-changes
mailing list