]> git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/mgr/dashboard/test_monitor.py
bump version to 18.2.4-pve3
[ceph.git] / ceph / qa / tasks / mgr / dashboard / test_monitor.py
1 # -*- coding: utf-8 -*-
2 from __future__ import absolute_import
3
4 from .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 def test_monitor_default(self):
16 data = self._get("/api/monitor")
17 self.assertStatus(200)
18
19 self.assertIn('mon_status', data)
20 self.assertIn('in_quorum', data)
21 self.assertIn('out_quorum', data)
22 self.assertIsNotNone(data['mon_status'])
23 self.assertIsNotNone(data['in_quorum'])
24 self.assertIsNotNone(data['out_quorum'])