ceph/qa/tasks/mgr/dashboard/test_rgw.py
Ricardo Dias aa205a6731
mgr/dashboard: renamed dashboard_v2 to dashboard
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-16 07:23:08 +00:00

31 lines
875 B
Python

# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, authenticate
class RgwControllerTest(DashboardTestCase):
@authenticate
def test_rgw_daemon_list(self):
data = self._get('/api/rgw/daemon')
self.assertStatus(200)
self.assertEqual(len(data), 1)
data = data[0]
self.assertIn('id', data)
self.assertIn('version', data)
self.assertIn('server_hostname', data)
@authenticate
def test_rgw_daemon_get(self):
data = self._get('/api/rgw/daemon')
self.assertStatus(200)
data = self._get('/api/rgw/daemon/{}'.format(data[0]['id']))
self.assertStatus(200)
self.assertIn('rgw_metadata', data)
self.assertIn('rgw_id', data)
self.assertIn('rgw_status', data)
self.assertTrue(data['rgw_metadata'])