pyocf: implement test_attach_cleaner_disabled_non_default

Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
Jan Musial 2022-06-22 09:55:29 +02:00
parent b898f5c336
commit b39161f1aa

View File

@ -150,7 +150,6 @@ def test_cleaner_disabled_nop(pyocf_ctx):
cache.set_cleaning_policy(CleaningPolicy.NOP) cache.set_cleaning_policy(CleaningPolicy.NOP)
@pytest.mark.skip(reason="not implemented")
def test_attach_cleaner_disabled_non_default(pyocf_ctx): def test_attach_cleaner_disabled_non_default(pyocf_ctx):
""" """
title: Attach cache with default config does not set clener_disabled. title: Attach cache with default config does not set clener_disabled.
@ -169,4 +168,11 @@ def test_attach_cleaner_disabled_non_default(pyocf_ctx):
requirements: requirements:
- disable_cleaner::default_setting - disable_cleaner::default_setting
""" """
pass cache_device = RamVolume(S.from_MiB(50))
cache = Cache.start_on_device(cache_device)
cleaning_size = get_metadata_segment_size(cache, CacheMetadataSegment.CLEANING)
assert (
cleaning_size > 0
), f'Metadata cleaning segment size expected: "> 0", got: "{cleaning_size}"'