]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] added post-test cleanup for an included zone file in query test.
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 4 Jan 2013 06:32:41 +0000 (22:32 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 4 Jan 2013 06:32:41 +0000 (22:32 -0800)
this fixes unittest failure on a static-link build (not really
static-link specific, but this happens if sqlite3 tests are skipped).

beyond the super trivial level, but I'm sure and have confirmed it fixes
the problem, so I'm committing it now.

src/bin/auth/tests/query_unittest.cc

index 685b0a86694d2031146c28201604eed9ca373cba..086b2515a61d3824141d7fcaba0b885a8c551251 100644 (file)
@@ -862,6 +862,15 @@ protected:
         list_ = createDataSrcClientList(GetParam(), memory_client);
     }
 
+    virtual void TearDown() {
+        // make sure to clear the commonly included zone file to prevent
+        // any remaining contents from affecting the next test.
+        ASSERT_EQ(0, std::system(INSTALL_PROG " -c " TEST_OWN_DATA_DIR
+                                 "/example-common-inc-template.zone "
+                                 TEST_OWN_DATA_BUILDDIR
+                                 "/example-common-inc.zone"));
+    }
+
     virtual ~QueryTest() {
         // Make sure we reset the hash creator to the default
         setNSEC3HashCreator(NULL);