]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: Fix raises that doesn't re-raise
authorJos Collin <jcollin@redhat.com>
Fri, 6 Sep 2019 06:17:47 +0000 (11:47 +0530)
committerRamana Raja <rraja@redhat.com>
Wed, 12 Feb 2020 10:11:59 +0000 (05:11 -0500)
* Fixed raises that doesn't re-raise
* Dropped some commands with --force remove commands, as it is unnecessary.

Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit 992d8b6a74400133405db69f1da94c98cf47fed6)

qa/tasks/cephfs/test_volumes.py

index 48b32401f71bd1e88d36a8b77906b3303fc039f6..ee86401f20814ec8e9a2cc48a223b0bfef3e545f 100644 (file)
@@ -406,9 +406,7 @@ class TestVolumes(CephFSTestCase):
             if ce.exitstatus != errno.EINVAL:
                 raise
         else:
-            raise
-        # clean up
-        self._fs_cmd("subvolume", "rm", self.volname, subvolume, "--force")
+            raise RuntimeError("expected the 'fs subvolume create' command to fail")
 
     def test_subvolume_create_with_auto_cleanup_on_fail(self):
         subvolume = self._generate_random_subvolume_name()
@@ -424,7 +422,7 @@ class TestVolumes(CephFSTestCase):
             if ce.exitstatus != errno.ENOENT:
                 raise
         else:
-            raise
+            raise RuntimeError("expected the `fs subvolume getpath` command to fail")
 
     def test_subvolume_create_with_invalid_size(self):
         # create subvolume with an invalid size -1
@@ -621,9 +619,7 @@ class TestVolumes(CephFSTestCase):
             if ce.exitstatus != errno.EINVAL:
                 raise
         else:
-            raise
-        # clean up
-        self._fs_cmd("subvolumegroup", "rm", self.volname, group, "--force")
+            raise RuntimeError("expected the 'fs subvolumegroup create' command to fail")
 
     def test_subvolume_group_create_with_auto_cleanup_on_fail(self):
         group = self._generate_random_group_name()
@@ -639,7 +635,7 @@ class TestVolumes(CephFSTestCase):
             if ce.exitstatus != errno.ENOENT:
                 raise
         else:
-            raise
+            raise RuntimeError("expected the 'fs subvolumegroup getpath' command to fail")
 
     def test_subvolume_create_with_desired_data_pool_layout_in_group(self):
         subvol1 = self._generate_random_subvolume_name()