]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: skip 'test_create_rbd_in_data_pool' without bluestore 21004/head
authorTatjana Dehler <tdehler@suse.com>
Wed, 21 Mar 2018 12:27:11 +0000 (13:27 +0100)
committerTatjana Dehler <tdehler@suse.com>
Fri, 23 Mar 2018 10:11:27 +0000 (11:11 +0100)
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 <tdehler@suse.com>
qa/tasks/mgr/dashboard/test_rbd.py

index 0835fc27fff1f3ed9d0f7f109705205e7d97c32b..adb4aa46f12f3377889be6a9eba9e9a5598c52e0 100644 (file)
@@ -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'])