Commit 9368ade9 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2853] Add test for SEGMENT_UNUSED case

parent 45087a11
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment