2018-02-14 16:05:56 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2018-02-28 22:14:35 +00:00
|
|
|
from .helper import DashboardTestCase, authenticate
|
2018-02-14 16:05:56 +00:00
|
|
|
|
|
|
|
|
2018-02-28 22:14:35 +00:00
|
|
|
class MonitorTest(DashboardTestCase):
|
2018-02-14 16:05:56 +00:00
|
|
|
@authenticate
|
|
|
|
def test_monitor_default(self):
|
|
|
|
data = self._get("/api/monitor")
|
|
|
|
self.assertStatus(200)
|
|
|
|
|
|
|
|
self.assertIn('mon_status', data)
|
|
|
|
self.assertIn('in_quorum', data)
|
|
|
|
self.assertIn('out_quorum', data)
|
|
|
|
self.assertIsNotNone(data['mon_status'])
|
|
|
|
self.assertIsNotNone(data['in_quorum'])
|
|
|
|
self.assertIsNotNone(data['out_quorum'])
|