Skip to content

Commit

Permalink
stratis_cli_cert: Add test for snapshot schedule-revert with no origin
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Gurney <[email protected]>
  • Loading branch information
bgurney-rh committed Sep 6, 2024
1 parent b0b2c9f commit 528cce0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions stratis_cli_cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,40 @@ def test_filesystem_snapshot_schedule_revert(self):
True,
)

@skip(_skip_condition(1))
def test_filesystem_snapshot_schedule_revert_noorigin_fail(self):
"""
Test scheduling a revert of a filesystem with no origin, which should fail.
"""
pool_name = make_test_pool(StratisCliCertify.DISKS[0:1])
filesystem_name = make_test_filesystem(pool_name)
snapshot_name = fs_n()
self._unittest_command(
[
_STRATIS_CLI,
"filesystem",
"snapshot",
pool_name,
filesystem_name,
snapshot_name,
],
0,
True,
True,
)
self._unittest_command(
[
_STRATIS_CLI,
"filesystem",
"schedule-revert",
pool_name,
filesystem_name,
],
1,
False,
True,
)

@skip(_skip_condition(1))
def test_filesystem_snapshot_destroy_filesystem(self):
"""
Expand Down

0 comments on commit 528cce0

Please sign in to comment.