From 992d8b6a74400133405db69f1da94c98cf47fed6 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Fri, 6 Sep 2019 11:47:47 +0530 Subject: [PATCH] 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 --- qa/tasks/cephfs/test_volumes.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 283f801774c..56e8dcc3579 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -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() -- 2.39.5