BIND 10 trac2853, updated. 9368ade9509ac5a2278c52d4c36c3a84d872531e [2853] Add test for SEGMENT_UNUSED case

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Jun 16 11:20:20 UTC 2013


The branch, trac2853 has been updated
       via  9368ade9509ac5a2278c52d4c36c3a84d872531e (commit)
      from  45087a113407dbb6b657f6e410dcf8158219effe (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 9368ade9509ac5a2278c52d4c36c3a84d872531e
Author: Mukund Sivaraman <muks at isc.org>
Date:   Sun Jun 16 03:50:20 2013 +0530

    [2853] Add test for SEGMENT_UNUSED case

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

Summary of changes:
 .../python/isc/datasrc/tests/clientlist_test.py    |   26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/datasrc/tests/clientlist_test.py b/src/lib/python/isc/datasrc/tests/clientlist_test.py
index 1fb581c..d46ff93 100644
--- a/src/lib/python/isc/datasrc/tests/clientlist_test.py
+++ b/src/lib/python/isc/datasrc/tests/clientlist_test.py
@@ -255,6 +255,32 @@ class ClientListTest(unittest.TestCase):
                                isc.datasrc.ConfigurableClientList.SEGMENT_INUSE),
                               status[0])
 
+    def test_get_status_unused(self):
+        """
+        Test getting status when segment type is mapped and it has not
+        been reset yet.
+        """
+
+        self.clist = isc.datasrc.ConfigurableClientList(isc.dns.RRClass.IN)
+        self.clist.configure('''[{
+            "type": "sqlite3",
+            "params": {
+                "database_file": "''' + TESTDATA_PATH + '''example.org.sqlite3"
+            },
+            "cache-zones" : ["example.org"],
+            "cache-type": "mapped",
+            "cache-enable": false
+        }]''', True)
+
+        status = self.clist.get_status()
+        self.assertIsNotNone(status)
+        self.assertIsInstance(status, list)
+        self.assertEqual(1, len(status))
+        self.assertIsInstance(status[0], tuple)
+        self.assertTupleEqual(('sqlite3', None,
+                               isc.datasrc.ConfigurableClientList.SEGMENT_UNUSED),
+                              status[0])
+
     def test_get_status_waiting(self):
         """
         Test getting status when segment type is mapped and it has not



More information about the bind10-changes mailing list