2018-02-28 22:14:35 +00:00
|
|
|
from __future__ import absolute_import
|
2018-02-22 13:52:08 +00:00
|
|
|
|
2018-02-28 22:14:35 +00:00
|
|
|
from .helper import DashboardTestCase, authenticate
|
2018-02-22 13:52:08 +00:00
|
|
|
|
2018-02-28 22:14:35 +00:00
|
|
|
|
|
|
|
class SummaryTest(DashboardTestCase):
|
|
|
|
CEPHFS = True
|
2018-02-22 13:52:08 +00:00
|
|
|
|
|
|
|
@authenticate
|
|
|
|
def test_summary(self):
|
|
|
|
data = self._get("/api/summary")
|
|
|
|
self.assertStatus(200)
|
|
|
|
|
|
|
|
self.assertIn('health_status', data)
|
|
|
|
self.assertIn('mgr_id', data)
|
|
|
|
self.assertIn('have_mon_connection', data)
|
2018-02-23 11:40:17 +00:00
|
|
|
self.assertIn('rbd_mirroring', data)
|
2018-03-08 13:49:17 +00:00
|
|
|
self.assertIn('executing_tasks', data)
|
|
|
|
self.assertIn('finished_tasks', data)
|
2018-06-08 10:57:38 +00:00
|
|
|
self.assertIn('version', data)
|
2018-02-22 13:52:08 +00:00
|
|
|
self.assertIsNotNone(data['health_status'])
|
|
|
|
self.assertIsNotNone(data['mgr_id'])
|
|
|
|
self.assertIsNotNone(data['have_mon_connection'])
|
2018-02-23 11:40:17 +00:00
|
|
|
self.assertEqual(data['rbd_mirroring'], {'errors': 0, 'warnings': 0})
|