|
@@ -255,6 +255,32 @@ class ClientListTest(unittest.TestCase):
|
|
isc.datasrc.ConfigurableClientList.SEGMENT_INUSE),
|
|
isc.datasrc.ConfigurableClientList.SEGMENT_INUSE),
|
|
status[0])
|
|
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):
|
|
def test_get_status_waiting(self):
|
|
"""
|
|
"""
|
|
Test getting status when segment type is mapped and it has not
|
|
Test getting status when segment type is mapped and it has not
|