From: Jos Collin Date: Tue, 26 Nov 2019 12:24:30 +0000 (+0530) Subject: qa/tasks: Fix the volume ls in test_volume_rm X-Git-Tag: v15.1.0~469^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=691352413e2b8ada25b587c1287a47087c3b9385;p=ceph-ci.git qa/tasks: Fix the volume ls in test_volume_rm Signed-off-by: Jos Collin --- diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 8b3e7498e26..f635ea8b83d 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -165,6 +165,10 @@ class TestVolumes(CephFSTestCase): self._fs_cmd("volume", "rm", volume, "--yes-i-really-mean-it") def test_volume_rm(self): + """ + That the volume can only be removed when --yes-i-really-mean-it is used + and verify that the deleted volume is not listed anymore. + """ try: self._fs_cmd("volume", "rm", self.volname) except CommandFailedError as ce: @@ -175,9 +179,10 @@ class TestVolumes(CephFSTestCase): self._fs_cmd("volume", "rm", self.volname, "--yes-i-really-mean-it") #check if it's gone - volumes = json.loads(self.mgr_cluster.mon_manager.raw_cluster_cmd('fs', 'volume', 'ls', '--format=json-pretty')) + volumes = json.loads(self._fs_cmd("volume", "ls", "--format=json-pretty")) if (self.volname in [volume['name'] for volume in volumes]): - raise RuntimeError("Expected the 'fs volume rm' command to succeed. The volume {0} not removed.".format(self.volname)) + raise RuntimeError("Expected the 'fs volume rm' command to succeed. " + "The volume {0} not removed.".format(self.volname)) else: raise RuntimeError("expected the 'fs volume rm' command to fail.")