BIND 10 trac2178, updated. 33c57e4cefbd3948e5527d34f0a56a4f4a50a308 [2178] add another correct zone to the test

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Aug 22 08:44:26 UTC 2012


The branch, trac2178 has been updated
       via  33c57e4cefbd3948e5527d34f0a56a4f4a50a308 (commit)
      from  d99645b48e66cee78ea12b8e1d62efd8f07e14bc (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 33c57e4cefbd3948e5527d34f0a56a4f4a50a308
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed Aug 22 10:44:09 2012 +0200

    [2178] add another correct zone to the test

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

Summary of changes:
 src/lib/datasrc/tests/client_list_unittest.cc      |   20 ++++++++++++--------
 .../tests/testdata/example.com.flattened}          |    0
 2 files changed, 12 insertions(+), 8 deletions(-)
 copy src/lib/{testutils/testdata/example.com.zone => datasrc/tests/testdata/example.com.flattened} (100%)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/client_list_unittest.cc b/src/lib/datasrc/tests/client_list_unittest.cc
index 8b1d474..fc571d9 100644
--- a/src/lib/datasrc/tests/client_list_unittest.cc
+++ b/src/lib/datasrc/tests/client_list_unittest.cc
@@ -787,24 +787,28 @@ TEST_F(ListTest, masterFiles) {
 }
 
 TEST_F(ListTest, BadMasterFile) {
-    // Configure one zone correctly, and one with the wrong origin
-    // (resulting in out-of-zone data)
-    // Configuration should succeed, and the correct zone should
-    // be loaded.
+    // Configure two zone correctly, and one with the wrong origin
+    // (resulting in an out-of-zone data error)
+    // Configuration should succeed, and the correct zones should
+    // be loaded. Neither the 'bad' origin or the zone it used
+    // should be loaded
     const ConstElementPtr elem(Element::fromJSON("["
         "{"
         "   \"type\": \"MasterFiles\","
         "   \"cache-enable\": true,"
         "   \"params\": {"
-        "       \"foo.bar.\": \"" TEST_DATA_DIR "/example.org\","
+        "       \"example.com.\": \"" TEST_DATA_DIR "/example.com.flattened\","
+        "       \"foo.bar.\": \"" TEST_DATA_DIR "/example.org.nsec3-signed\","
         "       \".\": \"" TEST_DATA_DIR "/root.zone\""
         "   }"
         "}]"));
     list_->configure(elem, true);
 
-    EXPECT_TRUE(negativeResult_ == list_->find(Name("example.org."), true));
-    EXPECT_TRUE(negativeResult_ == list_->find(Name("foo.bar"), true));
-    positiveResult(list_->find(Name(".")), ds_[0], Name("."), true, "com",
+    positiveResult(list_->find(Name("example.com."), true), ds_[0],
+                   Name("example.com."), true, "example.com", true);
+    EXPECT_EQ(negativeResult_, list_->find(Name("example.org."), true));
+    EXPECT_EQ(negativeResult_, list_->find(Name("foo.bar"), true));
+    positiveResult(list_->find(Name(".")), ds_[0], Name("."), true, "root",
                    true);
 }
 
diff --git a/src/lib/datasrc/tests/testdata/example.com.flattened b/src/lib/datasrc/tests/testdata/example.com.flattened
new file mode 100644
index 0000000..92d1f45
--- /dev/null
+++ b/src/lib/datasrc/tests/testdata/example.com.flattened
@@ -0,0 +1,3 @@
+example.com.    3600    IN  SOA ns.example.com. admin.example.com. 1234 3600 1800 2419200 7200
+example.com.    3600    IN  NS ns.example.com.
+ns.example.com.	3600    IN  A 192.0.2.1



More information about the bind10-changes mailing list