]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/mgr/dashboard/test_health.py
import ceph nautilus 14.2.2
[ceph.git] / ceph / qa / tasks / mgr / dashboard / test_health.py
index 71301cb5dbad9b7fc389d65d62a3fda9c9d0c2b6..afc632a6cfa0c954dad7d152ecebc4672f9cd242 100644 (file)
@@ -7,6 +7,18 @@ from .helper import DashboardTestCase, JAny, JLeaf, JList, JObj
 class HealthTest(DashboardTestCase):
     CEPHFS = True
 
+    __pg_info_schema = JObj({
+        'object_stats': JObj({
+            'num_objects': int,
+            'num_object_copies': int,
+            'num_objects_degraded': int,
+            'num_objects_misplaced': int,
+            'num_objects_unfound': int
+        }),
+        'pgs_per_osd': float,
+        'statuses': JObj({}, allow_unknown=True, unknown_schema=int)
+    })
+
     def test_minimal_health(self):
         data = self._get('/api/health/minimal')
         self.assertStatus(200)
@@ -22,7 +34,6 @@ class HealthTest(DashboardTestCase):
                 'stats': JObj({
                     'total_avail_bytes': int,
                     'total_bytes': int,
-                    'total_objects': int,
                     'total_used_raw_bytes': int,
                 })
             }),
@@ -65,10 +76,7 @@ class HealthTest(DashboardTestCase):
                         'up': int,
                     })),
             }),
-            'pg_info': JObj({
-                'pgs_per_osd': float,
-                'statuses': JObj({}, allow_unknown=True, unknown_schema=int)
-            }),
+            'pg_info': self.__pg_info_schema,
             'pools': JList(JLeaf(dict)),
             'rgw': int,
             'scrub_status': str
@@ -134,10 +142,11 @@ class HealthTest(DashboardTestCase):
                 'stats': JObj({
                     'total_avail_bytes': int,
                     'total_bytes': int,
-                    'total_objects': int,
                     'total_used_bytes': int,
                     'total_used_raw_bytes': int,
-                    'total_used_raw_ratio': float
+                    'total_used_raw_ratio': float,
+                    'num_osds': int,
+                    'num_per_pool_osds': int
                 })
             }),
             'fs_map': JObj({
@@ -243,10 +252,7 @@ class HealthTest(DashboardTestCase):
                         'up': int,
                     }, allow_unknown=True)),
             }, allow_unknown=True),
-            'pg_info': JObj({
-                'pgs_per_osd': float,
-                'statuses': JObj({}, allow_unknown=True, unknown_schema=int)
-            }),
+            'pg_info': self.__pg_info_schema,
             'pools': JList(JLeaf(dict)),
             'rgw': int,
             'scrub_status': str