From 9dc07d80967287051eab3245e58d029157d3e1da Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 30 Oct 2019 10:21:22 -0700 Subject: [PATCH] qa: add tests for CephFS admin commands Signed-off-by: Patrick Donnelly --- .../{config-commands.yaml => admin.yaml} | 2 +- .../recovery/tasks/config-commands.yaml | 12 --------- ...{test_config_commands.py => test_admin.py} | 26 +++++++++++++++++++ 3 files changed, 27 insertions(+), 13 deletions(-) rename qa/suites/fs/basic_functional/tasks/{config-commands.yaml => admin.yaml} (71%) delete mode 100644 qa/suites/kcephfs/recovery/tasks/config-commands.yaml rename qa/tasks/cephfs/{test_config_commands.py => test_admin.py} (75%) diff --git a/qa/suites/fs/basic_functional/tasks/config-commands.yaml b/qa/suites/fs/basic_functional/tasks/admin.yaml similarity index 71% rename from qa/suites/fs/basic_functional/tasks/config-commands.yaml rename to qa/suites/fs/basic_functional/tasks/admin.yaml index 2f51801d6cb..ef40ef93b58 100644 --- a/qa/suites/fs/basic_functional/tasks/config-commands.yaml +++ b/qa/suites/fs/basic_functional/tasks/admin.yaml @@ -8,4 +8,4 @@ overrides: tasks: - cephfs_test_runner: modules: - - tasks.cephfs.test_config_commands + - tasks.cephfs.test_admin diff --git a/qa/suites/kcephfs/recovery/tasks/config-commands.yaml b/qa/suites/kcephfs/recovery/tasks/config-commands.yaml deleted file mode 100644 index cb00216a983..00000000000 --- a/qa/suites/kcephfs/recovery/tasks/config-commands.yaml +++ /dev/null @@ -1,12 +0,0 @@ - -overrides: - ceph: - conf: - global: - lockdep: true - -tasks: - - cephfs_test_runner: - fail_on_skip: false - modules: - - tasks.cephfs.test_config_commands diff --git a/qa/tasks/cephfs/test_config_commands.py b/qa/tasks/cephfs/test_admin.py similarity index 75% rename from qa/tasks/cephfs/test_config_commands.py rename to qa/tasks/cephfs/test_admin.py index 51bf40f2ccb..6459ab77e54 100644 --- a/qa/tasks/cephfs/test_config_commands.py +++ b/qa/tasks/cephfs/test_admin.py @@ -2,6 +2,21 @@ from tasks.cephfs.cephfs_test_case import CephFSTestCase from tasks.cephfs.fuse_mount import FuseMount +class TestAdminCommands(CephFSTestCase): + """ + Tests for administration command. + """ + + CLIENTS_REQUIRED = 1 + MDSS_REQUIRED = 1 + + def test_fs_status(self): + """ + That `ceph fs status` command functions. + """ + + s = self.fs.mon_manager.raw_cluster_cmd("fs", "status") + self.assertTrue("active" in s) class TestConfigCommands(CephFSTestCase): """ @@ -12,6 +27,17 @@ class TestConfigCommands(CephFSTestCase): CLIENTS_REQUIRED = 1 MDSS_REQUIRED = 1 + def test_ceph_config_show(self): + """ + That I can successfully show MDS configuration. + """ + + names = self.fs.get_rank_names() + for n in names: + s = self.fs.mon_manager.raw_cluster_cmd("config", "show", "mds."+n) + self.assertTrue("NAME" in s) + self.assertTrue("mon_host" in s) + def test_client_config(self): """ That I can successfully issue asok "config set" commands -- 2.39.5