]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/mgr/dashboard/test_monitor.py
1 # -*- coding: utf-8 -*-
2 from __future__
import absolute_import
4 from .helper
import DashboardTestCase
7 class MonitorTest(DashboardTestCase
):
8 AUTH_ROLES
= ['cluster-manager']
10 @DashboardTestCase.RunAs('test', 'test', ['block-manager'])
11 def test_access_permissions(self
):
12 self
._get
('/api/monitor')
13 self
.assertStatus(403)
15 def test_monitor_default(self
):
16 data
= self
._get
("/api/monitor")
17 self
.assertStatus(200)
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'])