2018-02-22 13:52:08 +00:00
|
|
|
from dashboard_v2.tests.helper import ControllerTestCase, authenticate
|
|
|
|
|
|
|
|
|
|
|
|
class SummaryTest(ControllerTestCase):
|
|
|
|
|
|
|
|
@authenticate
|
|
|
|
def test_summary(self):
|
|
|
|
data = self._get("/api/summary")
|
|
|
|
self.assertStatus(200)
|
|
|
|
|
|
|
|
self.assertIn('filesystems', data)
|
|
|
|
self.assertIn('health_status', data)
|
|
|
|
self.assertIn('rbd_pools', 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-02-22 13:52:08 +00:00
|
|
|
self.assertIsNotNone(data['filesystems'])
|
|
|
|
self.assertIsNotNone(data['health_status'])
|
|
|
|
self.assertIsNotNone(data['rbd_pools'])
|
|
|
|
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})
|