From 075102468bb784cdce7c399c9dbfe9c4404e2808 Mon Sep 17 00:00:00 2001 From: Tatjana Dehler Date: Wed, 21 Mar 2018 13:27:11 +0100 Subject: [PATCH] mgr/dashboard: skip 'test_create_rbd_in_data_pool' without bluestore Skip the test case 'test_create_rbd_in_data_pool' only if the cluster does not support bluestore, otherwise run the test. The Ceph mgr provides the information if the cluster supports bluestore or not, so the test will be skipped depending on the current cluster. Signed-off-by: Tatjana Dehler --- qa/tasks/mgr/dashboard/test_rbd.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/qa/tasks/mgr/dashboard/test_rbd.py b/qa/tasks/mgr/dashboard/test_rbd.py index 0835fc27fff1..adb4aa46f12f 100644 --- a/qa/tasks/mgr/dashboard/test_rbd.py +++ b/qa/tasks/mgr/dashboard/test_rbd.py @@ -17,6 +17,13 @@ class RbdTest(DashboardTestCase): cls._rbd_cmd(['create', '--size=1G', 'img1']) cls._rbd_cmd(['create', '--size=2G', 'img2']) + osd_metadata = cls.ceph_cluster.mon_manager.get_osd_metadata() + cls.bluestore_support = True + for osd in osd_metadata: + if osd['osd_objectstore'] != 'bluestore': + cls.bluestore_support = False + break + @classmethod def tearDownClass(cls): super(RbdTest, cls).tearDownClass() @@ -66,11 +73,11 @@ class RbdTest(DashboardTestCase): 'deep-flatten, exclusive-lock, fast-diff, layering, object-map') break - # TODO: Re-enable this test for bluestore cluster by figuring out how to skip none-bluestore - # ones automatically - @unittest.skip("requires bluestore cluster") @authenticate def test_create_rbd_in_data_pool(self): + if not self.bluestore_support: + self.skipTest('requires bluestore cluster') + self._ceph_cmd(['osd', 'pool', 'create', 'data_pool', '12', '12', 'erasure']) self._ceph_cmd(['osd', 'pool', 'application', 'enable', 'data_pool', 'rbd']) self._ceph_cmd(['osd', 'pool', 'set', 'data_pool', 'allow_ec_overwrites', 'true']) -- 2.47.3