BIND 10 trac2281, updated. 11633f6c60336ff1ba648e09b51db064252e034c [2281] Enable factory test for static DS with bad zone file

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Feb 8 04:13:05 UTC 2013


The branch, trac2281 has been updated
       via  11633f6c60336ff1ba648e09b51db064252e034c (commit)
      from  899432b47a8460c65ae0211b0bee1f9296bfa433 (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 11633f6c60336ff1ba648e09b51db064252e034c
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Feb 8 09:42:45 2013 +0530

    [2281] Enable factory test for static DS with bad zone file

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

Summary of changes:
 src/lib/datasrc/tests/Makefile.am              |    1 +
 src/lib/datasrc/tests/factory_unittest.cc      |    9 +++------
 src/lib/datasrc/tests/testdata/static-bad.zone |    3 +++
 3 files changed, 7 insertions(+), 6 deletions(-)
 create mode 100644 src/lib/datasrc/tests/testdata/static-bad.zone

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/Makefile.am b/src/lib/datasrc/tests/Makefile.am
index 32e1263..c1e7d4e 100644
--- a/src/lib/datasrc/tests/Makefile.am
+++ b/src/lib/datasrc/tests/Makefile.am
@@ -114,5 +114,6 @@ EXTRA_DIST += testdata/new_minor_schema.sqlite3
 EXTRA_DIST += testdata/newschema.sqlite3
 EXTRA_DIST += testdata/oldschema.sqlite3
 EXTRA_DIST += testdata/static.zone
+EXTRA_DIST += testdata/static-bad.zone
 EXTRA_DIST += testdata/novalidate.zone
 EXTRA_DIST += testdata/checkwarn.zone
diff --git a/src/lib/datasrc/tests/factory_unittest.cc b/src/lib/datasrc/tests/factory_unittest.cc
index 12c611d..cc03ce3 100644
--- a/src/lib/datasrc/tests/factory_unittest.cc
+++ b/src/lib/datasrc/tests/factory_unittest.cc
@@ -29,6 +29,7 @@ using namespace isc::data;
 
 std::string SQLITE_DBFILE_EXAMPLE_ORG = TEST_DATA_DIR "/example.org.sqlite3";
 const std::string STATIC_DS_FILE = TEST_DATA_DIR "/static.zone";
+const std::string STATIC_BAD_DS_FILE = TEST_DATA_DIR "/static-bad.zone";
 const std::string ROOT_ZONE_FILE = TEST_DATA_DIR "/root.zone";
 
 namespace {
@@ -187,13 +188,9 @@ TEST(FactoryTest, staticDS) {
 }
 
 // Check that file not containing BIND./CH is rejected
-//
-// FIXME: This test is disabled because the InMemoryZoneFinder::load does
-// not check if the data loaded correspond with the origin. The static
-// factory is not the place to fix that.
-TEST(FactoryTest, DISABLED_staticDSBadFile) {
+TEST(FactoryTest, staticDSBadFile) {
     // The only configuration is the file to load.
-    const ConstElementPtr config(new StringElement(STATIC_DS_FILE));
+    const ConstElementPtr config(new StringElement(STATIC_BAD_DS_FILE));
     // See it does not want the file
     EXPECT_THROW(DataSourceClientContainer("static", config), DataSourceError);
 }
diff --git a/src/lib/datasrc/tests/testdata/static-bad.zone b/src/lib/datasrc/tests/testdata/static-bad.zone
new file mode 100644
index 0000000..500ccca
--- /dev/null
+++ b/src/lib/datasrc/tests/testdata/static-bad.zone
@@ -0,0 +1,3 @@
+NOTBIND.           3600    CH  SOA NOTBIND. NOTBIND. 4 3600 300 36000 3600
+NOTBIND.           3600    CH  NS  NOTBIND.
+VERSION.NOTBIND.   3600    CH  TXT "10"



More information about the bind10-changes mailing list