BIND 10 trac2108_3, updated. a376d4a632d9510ba8f4175b4221b245b812d65b [2108] Add DNAME+NS tests
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Sep 10 04:27:02 UTC 2012
The branch, trac2108_3 has been updated
via a376d4a632d9510ba8f4175b4221b245b812d65b (commit)
from f4ceb192ddc140409230eef5ecc55a13f04059f5 (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 a376d4a632d9510ba8f4175b4221b245b812d65b
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Sep 10 09:55:26 2012 +0530
[2108] Add DNAME+NS tests
-----------------------------------------------------------------------
Summary of changes:
.../datasrc/memory/tests/memory_client_unittest.cc | 34 ++++++++++++++++++++
src/lib/datasrc/memory/tests/testdata/Makefile.am | 4 +++
.../testdata/example.org-dname-ns-apex-1.zone | 4 +++
.../testdata/example.org-dname-ns-apex-2.zone | 4 +++
.../testdata/example.org-dname-ns-nonapex-1.zone | 4 +++
.../testdata/example.org-dname-ns-nonapex-2.zone | 4 +++
6 files changed, 54 insertions(+)
create mode 100644 src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-apex-1.zone
create mode 100644 src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-apex-2.zone
create mode 100644 src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-nonapex-1.zone
create mode 100644 src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-nonapex-2.zone
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/tests/memory_client_unittest.cc b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
index e16431b..771f036 100644
--- a/src/lib/datasrc/memory/tests/memory_client_unittest.cc
+++ b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
@@ -350,6 +350,40 @@ TEST_F(MemoryClientTest, loadCNAMEAndNotNSECThrows) {
// Teardown checks for memory segment leaks
}
+TEST_F(MemoryClientTest, loadDNAMEAndNSApex1) {
+ // DNAME + NS (apex) is OK
+ client_->load(Name("example.org"),
+ TEST_DATA_DIR
+ "/example.org-dname-ns-apex-1.zone");
+ // Teardown checks for memory segment leaks
+}
+
+TEST_F(MemoryClientTest, loadDNAMEAndNSApex2) {
+ // DNAME + NS (apex) is OK (reverse order)
+ client_->load(Name("example.org"),
+ TEST_DATA_DIR
+ "/example.org-dname-ns-apex-2.zone");
+ // Teardown checks for memory segment leaks
+}
+
+TEST_F(MemoryClientTest, loadDNAMEAndNSNonApex1) {
+ // DNAME + NS (non-apex) must throw
+ EXPECT_THROW(client_->load(Name("example.org"),
+ TEST_DATA_DIR
+ "/example.org-dname-ns-nonapex-1.zone"),
+ InMemoryClient::AddError);
+ // Teardown checks for memory segment leaks
+}
+
+TEST_F(MemoryClientTest, loadDNAMEAndNSNonApex2) {
+ // DNAME + NS (non-apex) must throw (reverse order)
+ EXPECT_THROW(client_->load(Name("example.org"),
+ TEST_DATA_DIR
+ "/example.org-dname-ns-nonapex-2.zone"),
+ InMemoryClient::AddError);
+ // Teardown checks for memory segment leaks
+}
+
TEST_F(MemoryClientTest, loadRRSIGFollowsNothing) {
EXPECT_THROW(client_->load(Name("example.org"),
TEST_DATA_DIR
diff --git a/src/lib/datasrc/memory/tests/testdata/Makefile.am b/src/lib/datasrc/memory/tests/testdata/Makefile.am
index 23429a4..8e0c2c8 100644
--- a/src/lib/datasrc/memory/tests/testdata/Makefile.am
+++ b/src/lib/datasrc/memory/tests/testdata/Makefile.am
@@ -24,3 +24,7 @@ EXTRA_DIST += example.org-wildcard-nsec3.zone
EXTRA_DIST += example.org-nsec3-fewer-labels.zone example.org-nsec3-more-labels.zone
EXTRA_DIST += example.org-cname-and-not-nsec-1.zone
EXTRA_DIST += example.org-cname-and-not-nsec-2.zone
+EXTRA_DIST += example.org-dname-ns-nonapex-1.zone
+EXTRA_DIST += example.org-dname-ns-nonapex-2.zone
+EXTRA_DIST += example.org-dname-ns-apex-1.zone
+EXTRA_DIST += example.org-dname-ns-apex-2.zone
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-apex-1.zone b/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-apex-1.zone
new file mode 100644
index 0000000..f57c25d
--- /dev/null
+++ b/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-apex-1.zone
@@ -0,0 +1,4 @@
+;; DNAME + NS (apex)
+example.org. 86400 IN SOA ns.example.org. ns.example.org. 2012091015 7200 3600 2592000 1200
+example.org. 3600 IN DNAME foo.example.com.
+example.org. 3600 IN NS bar.example.com.
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-apex-2.zone b/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-apex-2.zone
new file mode 100644
index 0000000..bb3f191
--- /dev/null
+++ b/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-apex-2.zone
@@ -0,0 +1,4 @@
+;; DNAME + NS (apex)
+example.org. 86400 IN SOA ns.example.org. ns.example.org. 2012091016 7200 3600 2592000 1200
+example.org. 3600 IN NS bar.example.com.
+example.org. 3600 IN DNAME foo.example.com.
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-nonapex-1.zone b/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-nonapex-1.zone
new file mode 100644
index 0000000..68a9805
--- /dev/null
+++ b/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-nonapex-1.zone
@@ -0,0 +1,4 @@
+;; DNAME + NS (non-apex)
+example.org. 86400 IN SOA ns.example.org. ns.example.org. 2012091014 7200 3600 2592000 1200
+ns1.example.org. 3600 IN DNAME foo.example.com.
+ns1.example.org. 3600 IN NS bar.example.com.
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-nonapex-2.zone b/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-nonapex-2.zone
new file mode 100644
index 0000000..1b671dd
--- /dev/null
+++ b/src/lib/datasrc/memory/tests/testdata/example.org-dname-ns-nonapex-2.zone
@@ -0,0 +1,4 @@
+;; DNAME + NS (non-apex)
+example.org. 86400 IN SOA ns.example.org. ns.example.org. 2012091015 7200 3600 2592000 1200
+ns1.example.org. 3600 IN NS bar.example.com.
+ns1.example.org. 3600 IN DNAME foo.example.com.
More information about the bind10-changes
mailing list