]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: Fix the volume ls in test_volume_rm 31884/head
authorJos Collin <jcollin@redhat.com>
Tue, 26 Nov 2019 12:24:30 +0000 (17:54 +0530)
committerJos Collin <jcollin@redhat.com>
Mon, 9 Dec 2019 12:07:17 +0000 (17:37 +0530)
Signed-off-by: Jos Collin <jcollin@redhat.com>
qa/tasks/cephfs/test_volumes.py

index 8b3e7498e26179a8abb12bde8b03c2f3bf5f6fd0..f635ea8b83dce591d24c3efc6d52b66ad0e412d9 100644 (file)
@@ -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.")