From d5325704bb5271143b87f3a68c141ed1f62e1c39 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 21 Dec 2023 16:18:00 -0500 Subject: [PATCH 1/2] stratis_cli_cert: Add test for deleting origin filesystem 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 61e8320..bd95583 100644 --- a/stratis_cli_cert.py +++ b/stratis_cli_cert.py @@ -1068,6 +1068,40 @@ def test_filesystem_snapshot(self): True, ) + @skip(_skip_condition(1)) + def test_filesystem_snapshot_destroy_filesystem(self): + """ + Test snapshotting a filesystem, then destroying the original filesystem. + """ + 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", + "destroy", + pool_name, + filesystem_name, + ], + 0, + True, + True, + ) + @skip(_skip_condition(1)) def test_filesystem_snapshot_permissions(self): """ From 453b798f2135e74a8a8471433030f5c11b82d434 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 21 Dec 2023 16:46:10 -0500 Subject: [PATCH 2/2] stratisd_cert: Add test for deleting origin filesystem Signed-off-by: Bryan Gurney --- stratisd_cert.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/stratisd_cert.py b/stratisd_cert.py index 43923d8..be89854 100644 --- a/stratisd_cert.py +++ b/stratisd_cert.py @@ -1054,6 +1054,27 @@ def test_filesystem_snapshot(self): StratisDbus.fs_snapshot(pool_path, fs_path, snapshot_name), dbus.UInt16(0) ) + @skip(_skip_condition(1)) + def test_filesystem_snapshot_destroy_filesystem(self): + """ + Test snapshotting a filesystem, then destroying the original filesystem. + """ + pool_name = p_n() + pool_path, _ = make_test_pool(pool_name, StratisCertify.DISKS[0:1]) + + fs_name = fs_n() + fs_path = make_test_filesystem(pool_path, fs_name) + + snapshot_name = fs_n() + + self._unittest_command( + StratisDbus.fs_snapshot(pool_path, fs_path, snapshot_name), dbus.UInt16(0) + ) + + self._unittest_command( + StratisDbus.fs_destroy(pool_name, fs_name), dbus.UInt16(0) + ) + @skip(_skip_condition(1)) def test_filesystem_snapshot_permissions(self): """