From 6a102c082aacb920713ecd0b76c124ba22f2b451 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Fri, 30 Aug 2024 17:56:06 -0400 Subject: [PATCH] stratis_cli_cert: Add test for snapshot cancel-revert Signed-off-by: Bryan Gurney --- stratis_cli_cert.py | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/stratis_cli_cert.py b/stratis_cli_cert.py index 8f56c8c..a78f617 100644 --- a/stratis_cli_cert.py +++ b/stratis_cli_cert.py @@ -1104,6 +1104,52 @@ def test_filesystem_snapshot(self): True, ) + @skip(_skip_condition(1)) + def test_filesystem_snapshot_cancel_revert(self): + """ + Test canceling a revert of a filesystem snapshot. + """ + 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, + snapshot_name, + ], + 0, + True, + True, + ) + self._unittest_command( + [ + _STRATIS_CLI, + "filesystem", + "cancel-revert", + pool_name, + snapshot_name, + ], + 0, + True, + True, + ) + @skip(_skip_condition(1)) def test_filesystem_snapshot_destroy_filesystem(self): """