Skip to content

Commit

Permalink
tests: fix tests after tf disk recognition refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
  • Loading branch information
Kamil Gierszewski committed Sep 12, 2024
1 parent 252866d commit 4afa954
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion test/functional/tests/cli/test_zero_metadata_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_zero_metadata_dirty_shutdown():
TestRun.LOGGER.info("This could ended with error (expected)")

with TestRun.step("Plug cache device."):
cache_disk.plug()
cache_disk.plug_all()
time.sleep(1)

with TestRun.step("Start cache (expect to fail)."):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async def test_data_integrity_unplug(cache_mode):
raise

with TestRun.step("Plug back the cache device"):
cache_dev.plug()
cache_dev.plug_all()

with TestRun.step("Load cache"):
cache = casadm.load_cache(cache_dev)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def test_one_core_fail(cache_mode):
casadm.stop_all_caches()

with TestRun.step("Plug back the first core."):
core_dev1.plug()
core_dev1.plug_all()


@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
Expand Down Expand Up @@ -311,7 +311,7 @@ def test_one_core_fail_dirty():
casadm.stop_all_caches()

with TestRun.step("Plug back the first core."):
core_dev1.plug()
core_dev1.plug_all()


def dd_builder(cache_mode: CacheMode, dev: Core, size: Size):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ def test_soft_hot_unplug_cache(cache_mode):
casadm.stop_all_caches()

with TestRun.step("Plug back cache device"):
cache_dev.plug()
cache_dev.plug_all()


@pytest.mark.parametrizex("cache_mode", CacheMode)
@pytest.mark.parametrizex("cache_mode", [CacheMode.WO, CacheMode.WB])
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
@pytest.mark.require_disk("core1", DiskTypeLowerThan("cache"))
@pytest.mark.require_disk("core2", DiskTypeLowerThan("cache"))
Expand Down Expand Up @@ -197,7 +197,7 @@ def test_soft_hot_unplug_core(cache_mode):
casadm.stop_all_caches()

with TestRun.step("Plug back core device"):
core_dev_unplugged.plug()
core_dev_unplugged.plug_all()


def fio_prepare(core):
Expand Down
12 changes: 6 additions & 6 deletions test/functional/tests/incremental_load/test_udev.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_udev_core_partition():
core_disk.unplug()

with TestRun.step("Plug missing core disk."):
core_disk.plug()
core_disk.plug_all()
time.sleep(1)

with TestRun.step("List cache devices and check that created partitions are present "
Expand Down Expand Up @@ -102,7 +102,7 @@ def test_udev_core():
core_disk.unplug()

with TestRun.step("Plug core disk."):
core_disk.plug()
core_disk.plug_all()
time.sleep(1)

with TestRun.step("Check if core device is listed in core pool."):
Expand All @@ -112,7 +112,7 @@ def test_udev_core():
cache_disk.unplug()

with TestRun.step("Plug cache disk."):
cache_disk.plug()
cache_disk.plug_all()

with TestRun.step("Check if core device is active and not in the core pool."):
check_if_dev_in_core_pool(core_dev, False)
Expand Down Expand Up @@ -199,7 +199,7 @@ def test_udev_cache_load(cache_mode):
cache_disk.unplug()

with TestRun.step("Plug cache disk."):
cache_disk.plug()
cache_disk.plug_all()
time.sleep(1)

with TestRun.step("List caches and check if cache is loaded."):
Expand Down Expand Up @@ -263,7 +263,7 @@ def test_neg_udev_cache_load():

with TestRun.step("Unplug and plug cache disk."):
cache_disk.unplug()
cache_disk.plug()
cache_disk.plug_all()
time.sleep(1)

with TestRun.step("Check if CAS is loaded correctly."):
Expand Down Expand Up @@ -292,7 +292,7 @@ def test_neg_udev_cache_load():

with TestRun.step("Unplug and plug core disk."):
core_disk.unplug()
core_disk.plug()
core_disk.plug_all()
time.sleep(1)

with TestRun.step("Check if two cores assigned to not loaded cache are inserted to core pool."):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_recovery_unplug_cache_fs(cache_mode, cls, filesystem, direct):

with TestRun.step("Plug missing cache device."):
TestRun.LOGGER.info(str(casadm.list_caches(by_id_path=False)))
cache_disk.plug()
cache_disk.plug_all()

with TestRun.step("Load cache."):
cache = casadm.load_cache(cache_device)
Expand Down Expand Up @@ -174,7 +174,7 @@ def test_recovery_unplug_cache_raw(cache_mode, cls):

with TestRun.step("Plug missing cache device."):
TestRun.LOGGER.info(str(casadm.list_caches(by_id_path=False)))
cache_disk.plug()
cache_disk.plug_all()

with TestRun.step("Load cache."):
cache = casadm.load_cache(cache_device)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_fuzzy_remove_inactive_cache_id(
)
if output.exit_code == 0:
with TestRun.step("Reload cache with inactive core"):
core_disk.plug()
core_disk.plug_all()
cache.add_core(core_dev=core_disk)
InitConfig.create_init_config_from_running_configuration()
cache.stop(no_data_flush=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_fuzzy_remove_inactive_core_id(
)
if output.exit_code == 0:
with TestRun.step("Reload cache with inactive core"):
core_disk.plug()
core_disk.plug_all()
cache.add_core(core_dev=core_disk)
InitConfig.create_init_config_from_running_configuration()
cache.stop(no_data_flush=True)
Expand Down

0 comments on commit 4afa954

Please sign in to comment.