From: Laura Flores Date: Thu, 14 Oct 2021 23:59:47 +0000 (+0000) Subject: qa/tasks/mgr: update tests that use `mgr module ls` to specify the json format X-Git-Tag: v17.1.0~466^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb0a39b7d953bf05eef8d24ba4efb7a3ead3c17b;p=ceph.git qa/tasks/mgr: update tests that use `mgr module ls` to specify the json format Signed-off-by: Laura Flores --- diff --git a/qa/tasks/mgr/mgr_test_case.py b/qa/tasks/mgr/mgr_test_case.py index f5392d3ba38a3..5fe5e0759856c 100644 --- a/qa/tasks/mgr/mgr_test_case.py +++ b/qa/tasks/mgr/mgr_test_case.py @@ -74,7 +74,7 @@ class MgrTestCase(CephTestCase): # Unload all non-default plugins loaded = json.loads(cls.mgr_cluster.mon_manager.raw_cluster_cmd( - "mgr", "module", "ls"))['enabled_modules'] + "mgr", "module", "ls", "--format=json-pretty"))['enabled_modules'] unload_modules = set(loaded) - {"cephadm", "restful"} for m in unload_modules: @@ -111,7 +111,7 @@ class MgrTestCase(CephTestCase): def _unload_module(cls, module_name): def is_disabled(): enabled_modules = json.loads(cls.mgr_cluster.mon_manager.raw_cluster_cmd( - 'mgr', 'module', 'ls'))['enabled_modules'] + 'mgr', 'module', 'ls', "--format=json-pretty"))['enabled_modules'] return module_name not in enabled_modules if is_disabled(): @@ -124,7 +124,7 @@ class MgrTestCase(CephTestCase): @classmethod def _load_module(cls, module_name): loaded = json.loads(cls.mgr_cluster.mon_manager.raw_cluster_cmd( - "mgr", "module", "ls"))['enabled_modules'] + "mgr", "module", "ls", "--format=json-pretty"))['enabled_modules'] if module_name in loaded: # The enable command is idempotent, but our wait for a restart # isn't, so let's return now if it's already loaded