]> git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/mgr/dashboard/test_monitor.py
import 15.2.4
[ceph.git] / ceph / qa / tasks / mgr / dashboard / test_monitor.py
1 # -*- coding: utf-8 -*-
2 from __future__ import absolute_import
3
4 from tasks.mgr.dashboard.helper import DashboardTestCase
5
6
7 class MonitorTest(DashboardTestCase):
8 AUTH_ROLES = ['cluster-manager']
9
10 @DashboardTestCase.RunAs('test', 'test', ['block-manager'])
11 def test_access_permissions(self):
12 self._get('/api/monitor')
13 self.assertStatus(403)
14
15
16 def test_monitor_default(self):
17 data = self._get("/api/monitor")
18 self.assertStatus(200)
19
20 self.assertIn('mon_status', data)
21 self.assertIn('in_quorum', data)
22 self.assertIn('out_quorum', data)
23 self.assertIsNotNone(data['mon_status'])
24 self.assertIsNotNone(data['in_quorum'])
25 self.assertIsNotNone(data['out_quorum'])