mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
mgr/dashboard: ensure limit 0 returns 0 images
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
This commit is contained in:
parent
78871e59c0
commit
a80c058ad2
@ -130,6 +130,12 @@ class RbdServiceTest(unittest.TestCase):
|
||||
'namespace': ''
|
||||
}
|
||||
|
||||
# test with limit 0, it should return a list of pools with an empty list, but
|
||||
rbd_pool_list = RbdService.rbd_pool_list(['test_pool'], offset=0, limit=0)
|
||||
self.assertEqual(rbd_pool_list, ([], 1))
|
||||
|
||||
self.rbd_inst_mock.namespace_list.return_value = []
|
||||
|
||||
rbd_pool_list = RbdService.rbd_pool_list(['test_pool'], offset=0, limit=5)
|
||||
self.assertEqual(rbd_pool_list, ([{
|
||||
'id': '3c1a5ee60a88',
|
||||
|
Loading…
Reference in New Issue
Block a user