]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test_cephfs_shell: update test since shell can now read ceph.conf
authorRishabh Dave <ridave@redhat.com>
Wed, 13 Nov 2019 12:42:13 +0000 (18:12 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 6 Dec 2019 03:22:59 +0000 (08:52 +0530)
In the test
test_cephfs_shell.TestMisc.test_issue_cephfs_shell_cmd_at_invocation,
don't set the shell option with in the command to be tested since
CephFS shell can now read it's value from ceph.conf.

Also, add methods to set config options for vstart as well teuthology
testing.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/filesystem.py
qa/tasks/cephfs/test_cephfs_shell.py
qa/tasks/vstart_runner.py

index d65c3a3e3f42fb683958bca3be3c02f2cfe478d0..be0fc9197a7b098425ffa31f533046e5e1abbb90 100644 (file)
@@ -173,6 +173,12 @@ class CephCluster(object):
         self._ctx = ctx
         self.mon_manager = ceph_manager.CephManager(self.admin_remote, ctx=ctx, logger=log.getChild('ceph_manager'))
 
+    def set_config_opt(self, section, opt, val):
+        self.mon_manager.raw_cluster_cmd('config', 'set', section, opt, val)
+
+    def rm_config_opt(self, section, opt):
+        self.mon_manager.raw_cluster_cmd('config', 'rm', section)
+
     def get_config(self, key, service_type=None):
         """
         Get config from mon by default, or a specific service if caller asks for it
index 42137189a17b5a2c887b78f6746675d481f6a6ea..f4ab63f19a7bb947cfbc1a296b372e801a09e004 100644 (file)
@@ -671,11 +671,8 @@ class TestMisc(TestCephFSShell):
         dirname = 'somedirectory'
         self.run_cephfs_shell_cmd(['mkdir', dirname])
 
-        # TODO: Once cephfs-shell can pickup its config variables from
-        # ceph.conf, set colors Never there and get rid of the same in
-        # following comamnd.
         output = self.mount_a.client_remote.run(args=['cephfs-shell', '-c',
-            self.mount_a.config_path, 'set colors Never, ls'],
+            self.mount_a.config_path, 'ls'],
             stdout=StringIO()).stdout.getvalue().strip()
 
         if sys_version_info.major >= 3:
index ef0ff340d8e7184b75b6e36f35257f31e9fa1430..db838c6668bf9e52ed027a532a1e4a0bfa3bce1c 100644 (file)
@@ -1002,6 +1002,12 @@ class LocalCephCluster(CephCluster):
     def admin_remote(self):
         return LocalRemote()
 
+    def set_config_opt(self, section, opt, val):
+        self.mon_manager.raw_cluster_cmd('config', 'set', section, opt, val)
+
+    def rm_config_opt(self, section, opt):
+        self.mon_manager.raw_cluster_cmd('config', 'rm', section, opt)
+
     def get_config(self, key, service_type=None):
         if service_type is None:
             service_type = 'mon'