diff --git a/stratis_cli_cert.py b/stratis_cli_cert.py index bbcac74..b7f28fb 100644 --- a/stratis_cli_cert.py +++ b/stratis_cli_cert.py @@ -545,13 +545,9 @@ def test_pool_stop_started(self): """ Test stopping a started pool. """ + pool_name = make_test_pool(StratisCliCertify.DISKS[0:1]) self._unittest_command( - [ - _STRATIS_CLI, - "pool", - "stop", - make_test_pool(StratisCliCertify.DISKS[0:1]), - ], + [_STRATIS_CLI, "pool", "stop", f"--name={pool_name}"], 0, True, True, @@ -569,7 +565,7 @@ def test_pool_start_by_name(self): _STRATIS_CLI, "pool", "stop", - pool_name, + f"--name={pool_name}", ], 0, True, @@ -936,7 +932,7 @@ def test_pool_stop_stopped(self): _STRATIS_CLI, "pool", "stop", - pool_name, + f"--name={pool_name}", ], 0, True, @@ -947,7 +943,7 @@ def test_pool_stop_stopped(self): _STRATIS_CLI, "pool", "stop", - pool_name, + f"--name={pool_name}", ], 1, False, diff --git a/stratisd_cert.py b/stratisd_cert.py index d8938c5..9e25a7a 100644 --- a/stratisd_cert.py +++ b/stratisd_cert.py @@ -507,10 +507,10 @@ def test_pool_stop_started(self): Test stopping a started pool """ pool_name = p_n() - pool_path = make_test_pool(pool_name, StratisCertify.DISKS[0:1]) + make_test_pool(pool_name, StratisCertify.DISKS[0:1]) self._unittest_command( - StratisDbus.pool_stop(pool_path), + StratisDbus.pool_stop(pool_name, "name"), dbus.UInt16(0), ) @@ -520,15 +520,15 @@ def test_pool_stop_stopped(self): Test stopping a stopped pool """ pool_name = p_n() - pool_path = make_test_pool(pool_name, StratisCertify.DISKS[0:1]) + make_test_pool(pool_name, StratisCertify.DISKS[0:1]) self._unittest_command( - StratisDbus.pool_stop(pool_path), + StratisDbus.pool_stop(pool_name, "name"), dbus.UInt16(0), ) self._unittest_command( - StratisDbus.pool_stop(pool_path), + StratisDbus.pool_stop(pool_name, "name"), dbus.UInt16(0), ) @@ -543,7 +543,7 @@ def test_pool_start_stopped(self): pool_uuid = StratisDbus.pool_uuid(pool_path) self._unittest_command( - StratisDbus.pool_stop(pool_path), + StratisDbus.pool_stop(pool_uuid, "uuid"), dbus.UInt16(0), ) @@ -558,10 +558,10 @@ def test_pool_start_by_name(self): Test starting a stopped pool by its name """ pool_name = p_n() - pool_path = make_test_pool(pool_name, StratisCertify.DISKS[0:1]) + make_test_pool(pool_name, StratisCertify.DISKS[0:1]) self._unittest_command( - StratisDbus.pool_stop(pool_path), + StratisDbus.pool_stop(pool_name, "name"), dbus.UInt16(0), ) diff --git a/testlib/dbus.py b/testlib/dbus.py index ba66603..dbaf75c 100644 --- a/testlib/dbus.py +++ b/testlib/dbus.py @@ -260,7 +260,7 @@ def pool_start(id_string, id_type): return manager_iface.StartPool(id_string, id_type, (False, "")) @staticmethod - def pool_stop(pool_path): + def pool_stop(id_string, id_type): """ Stop a pool """ @@ -269,7 +269,7 @@ def pool_stop(pool_path): StratisDbus._MNGR_IFACE, ) - return manager_iface.StopPool(pool_path) + return manager_iface.StopPool(id_string, id_type) @staticmethod def pool_uuid(pool_path):