From 528cce043df4efa7f793af727bdced5c5003a391 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Fri, 6 Sep 2024 11:58:46 -0400 Subject: [PATCH] stratis_cli_cert: Add test for snapshot schedule-revert with no origin Signed-off-by: Bryan Gurney --- stratis_cli_cert.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/stratis_cli_cert.py b/stratis_cli_cert.py index a9e85c0..9ed7409 100644 --- a/stratis_cli_cert.py +++ b/stratis_cli_cert.py @@ -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): """