]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/mgr: fix test_pool.py
authorKefu Chai <kchai@redhat.com>
Fri, 11 May 2018 14:12:43 +0000 (22:12 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 12 May 2018 10:34:26 +0000 (18:34 +0800)
* per command desc of "osd pool set", "val" parameter should be a "string"
  not a number. so update the test_pool.py accordingly.
* also as a follow-up of 65925511bc, we need to update the test
  accordingly to reflect the change in the error's str representation.

Fixes: http://tracker.ceph.com/issues/24077
Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/mgr/dashboard/test_pool.py

index e884d2f1cd3737b694f3aa479cef0cb8d42f5492..212ae8355a870886b7016f4b731dde42ae0b6001 100644 (file)
@@ -97,9 +97,10 @@ class PoolTest(DashboardTestCase):
                                          data['application_metadata'].split(','))
                     elif k == 'pool':
                         self.assertEqual(pool['pool_name'], v)
-                    elif k in ['compression_mode', 'compression_algorithm',
-                               'compression_max_blob_size']:
+                    elif k in ['compression_mode', 'compression_algorithm']:
                         self.assertEqual(pool['options'][k], data[k])
+                    elif k == 'compression_max_blob_size':
+                        self.assertEqual(pool['options'][k], int(data[k]))
                     elif k == 'compression_required_ratio':
                         self.assertEqual(pool['options'][k], float(data[k]))
                     else:
@@ -136,7 +137,7 @@ class PoolTest(DashboardTestCase):
             'pool_type': 'replicated',
             'compression_algorithm': 'zstd',
             'compression_mode': 'aggressive',
-            'compression_max_blob_size': 10000000,
+            'compression_max_blob_size': "10000000",
             'compression_required_ratio': '0.8',
         }]
         for data in pools:
@@ -150,7 +151,7 @@ class PoolTest(DashboardTestCase):
         self.assertJsonBody({
             'component': 'pool',
             'code': "2",
-            'detail': "specified rule dnf doesn't exist"
+            'detail': "[errno -2] specified rule dnf doesn't exist"
         })
 
     @authenticate