]> git.apps.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)
committerJos Collin <jcollin@redhat.com>
Wed, 20 Nov 2019 06:35:09 +0000 (12:05 +0530)
* 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>
qa/tasks/cephfs/test_volumes.py

index 283f801774c452aa25b132d3ae67505d823082e4..56e8dcc3579b9b23707c75c6830d91db2eca8bc0 100644 (file)
@@ -385,9 +385,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()
@@ -403,7 +401,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
@@ -601,9 +599,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()
@@ -619,7 +615,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()