except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise
+ else:
+ raise RuntimeError("expected the 'fs subvolume getpath' command to fail. Subvolume not removed.")
# verify trash dir is clean
self._wait_for_trash_empty()
if ce.exitstatus != errno.ENOENT:
raise
else:
- raise RuntimeError("expected the `fs subvolume getpath` command to fail")
+ 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
except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise
-
- # force remove subvolume
- self._fs_cmd("subvolume", "rm", self.volname, subvolume, "--force")
+ else:
+ raise RuntimeError("expected the 'fs subvolume rm' command to fail")
def test_nonexistent_subvolume_group_create(self):
subvolume = self._generate_random_subvolume_name()
except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise
+ else:
+ raise RuntimeError("expected the 'fs subvolume create' command to fail")
def test_default_uid_gid_subvolume(self):
subvolume = self._generate_random_subvolume_name()
# remove subvolume
self._fs_cmd("subvolume", "rm", self.volname, subvolname)
- def test_nonexistent_subvolme_group_rm(self):
+ def test_nonexistent_subvolume_group_rm(self):
group = "non_existent_group"
# try, remove subvolume group
except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise
-
- # force remove subvolume
- self._fs_cmd("subvolumegroup", "rm", self.volname, group, "--force")
+ else:
+ raise RuntimeError("expected the 'fs subvolumegroup rm' command to fail")
def test_default_uid_gid_subvolume_group(self):
group = self._generate_random_group_name()
except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise
-
- # force remove snapshot
- self._fs_cmd("subvolume", "snapshot", "rm", self.volname, subvolume, snapshot, "--force")
+ else:
+ raise RuntimeError("expected the 'fs subvolume snapshot rm' command to fail")
# remove subvolume
self._fs_cmd("subvolume", "rm", self.volname, subvolume)
except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise
+ else:
+ raise RuntimeError("expected the 'fs subvolumegroup snapshot rm' command to fail")
# remove subvolume
self._fs_cmd("subvolume", "rm", self.volname, subvolume, group)