]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Updated API pool tests 25618/head
authoralfonsomthd <almartin@redhat.com>
Tue, 18 Dec 2018 17:13:42 +0000 (18:13 +0100)
committeralfonsomthd <almartin@redhat.com>
Tue, 18 Dec 2018 17:13:42 +0000 (18:13 +0100)
Updated API pool tests
as stats are enabled by default when retrieving the pool list
since:
https://github.com/ceph/ceph/pull/25489

Fixes: https://tracker.ceph.com/issues/37704
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
qa/tasks/mgr/dashboard/test_pool.py

index 92276d2280668216ee9ffc62c860d05784e06cb0..c0330ece6f59f6ff2b3f727e66edfc8b963d737c 100644 (file)
@@ -127,7 +127,8 @@ class PoolTest(DashboardTestCase):
         self.assertEqual(len(cluster_pools), len(data))
         self.assertSchemaBody(JList(self.pool_schema))
         for pool in data:
-            self.assertNotIn('stats', pool)
+            self.assertIn('pg_status', pool)
+            self.assertIn('stats', pool)
             self.assertIn(pool['pool_name'], cluster_pools)
 
     def test_pool_list_attrs(self):
@@ -141,11 +142,12 @@ class PoolTest(DashboardTestCase):
             self.assertIn('type', pool)
             self.assertIn('flags', pool)
             self.assertNotIn('flags_names', pool)
+            self.assertNotIn('pg_status', pool)
             self.assertNotIn('stats', pool)
             self.assertIn(pool['pool_name'], cluster_pools)
 
-    def test_pool_list_stats(self):
-        data = self._get("/api/pool?stats=true")
+    def test_pool_list_without_stats(self):
+        data = self._get("/api/pool?stats=false")
         self.assertStatus(200)
 
         cluster_pools = self.ceph_cluster.mon_manager.list_pools()
@@ -155,7 +157,8 @@ class PoolTest(DashboardTestCase):
             self.assertIn('type', pool)
             self.assertIn('application_metadata', pool)
             self.assertIn('flags', pool)
-            self.assertIn('stats', pool)
+            self.assertNotIn('pg_status', pool)
+            self.assertNotIn('stats', pool)
             self.assertIn('flags_names', pool)
             self.assertIn(pool['pool_name'], cluster_pools)
 
@@ -166,6 +169,7 @@ class PoolTest(DashboardTestCase):
         self.assertEqual(pool['pool_name'], cluster_pools[0])
         self.assertIn('type', pool)
         self.assertIn('flags', pool)
+        self.assertNotIn('pg_status', pool)
         self.assertIn('stats', pool)
         self.assertNotIn('flags_names', pool)