Skip to content

Commit

Permalink
qa: add tests for CephFS admin commands
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
  • Loading branch information
batrick committed Oct 30, 2019
1 parent a1a220d commit 9dc07d8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
Expand Up @@ -8,4 +8,4 @@ overrides:
tasks:
- cephfs_test_runner:
modules:
- tasks.cephfs.test_config_commands
- tasks.cephfs.test_admin
12 changes: 0 additions & 12 deletions qa/suites/kcephfs/recovery/tasks/config-commands.yaml

This file was deleted.

Expand Up @@ -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):
"""
Expand All @@ -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
Expand Down

0 comments on commit 9dc07d8

Please sign in to comment.