]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/mgr/dashboard/test_monitor.py
0cf7e25a282a6b6e4229eb34ea6095627eedac6c
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)
16 def test_monitor_default(self
):
17 data
= self
._get
("/api/monitor")
18 self
.assertStatus(200)
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'])