From: Jos Collin Date: Fri, 6 Sep 2019 06:17:47 +0000 (+0530) Subject: qa/tasks: Fix raises that doesn't re-raise X-Git-Tag: v14.2.8~49^2~42 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9243d59cbfe19e2760d26e35958d740bf3143467;p=ceph.git qa/tasks: Fix raises that doesn't re-raise * Fixed raises that doesn't re-raise * Dropped some commands with --force remove commands, as it is unnecessary. Signed-off-by: Jos Collin (cherry picked from commit 992d8b6a74400133405db69f1da94c98cf47fed6) --- diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 48b32401f71b..ee86401f2081 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -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()