]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/mgr/dashboard/test_perf_counters.py
import 15.2.4
[ceph.git] / ceph / qa / tasks / mgr / dashboard / test_perf_counters.py
index 33e10e08e8116ec35de035dc51da7f86a5d0798a..99133a77cc725dbb3fd5093da31b77657b7b8cfc 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 from __future__ import absolute_import
 
-from .helper import DashboardTestCase, JObj
+from tasks.mgr.dashboard.helper import DashboardTestCase, JObj
 
 
 class PerfCountersControllerTest(DashboardTestCase):
@@ -39,7 +39,7 @@ class PerfCountersControllerTest(DashboardTestCase):
         self._validate_perf(mon, 'mon', data, allow_empty=False)
 
     def test_perf_counters_mgr_get(self):
-        mgr = self.mgr_cluster.mgr_ids[0]
+        mgr = list(self.mgr_cluster.mgr_ids)[0]
         data = self._get('/api/perf_counters/mgr/{}'.format(mgr))
         self.assertStatus(200)
         self._validate_perf(mgr, 'mgr', data, allow_empty=False)
@@ -65,9 +65,7 @@ class PerfCountersControllerTest(DashboardTestCase):
         self.assertStatus(404)
         schema = JObj(sub_elems={
             'status': str,
-            'version': str,
             'detail': str,
-            'traceback': str,
-        })
+        }, allow_unknown=True)
         self.assertEqual(self._resp.json()['detail'], "'osd.{}' not found".format(unused_id))
         self.assertSchemaBody(schema)