test-api: add string representation of SeqCutOffPolicy
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
This commit is contained in:
parent
4ebc00bac8
commit
908672fd66
@ -72,9 +72,9 @@ class CacheMode(Enum):
|
||||
|
||||
|
||||
class SeqCutOffPolicy(Enum):
|
||||
full = 0
|
||||
always = 1
|
||||
never = 2
|
||||
full = "full"
|
||||
always = "always"
|
||||
never = "never"
|
||||
DEFAULT = full
|
||||
|
||||
@classmethod
|
||||
@ -85,6 +85,9 @@ class SeqCutOffPolicy(Enum):
|
||||
|
||||
raise ValueError(f"{name} is not a valid sequential cut off name")
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
|
||||
class MetadataMode(Enum):
|
||||
normal = "normal"
|
||||
|
@ -173,7 +173,11 @@ def test_activate_incomplete_cache():
|
||||
TestRun.fail(f"Expected one inactive core. Got {inactive_core_count}")
|
||||
|
||||
with TestRun.step("Check if core is in an appropriate state"):
|
||||
core_status = CoreStatus[get_core_info_by_path(core_dev_path)["status"].lower()]
|
||||
core_status = CoreStatus[
|
||||
get_core_info_by_path(core_disk_path=core_dev_path, target_cache_id=cache.cache_id)[
|
||||
"status"
|
||||
].lower()
|
||||
]
|
||||
if core_status != CoreStatus.inactive:
|
||||
TestRun.fail(
|
||||
"The core is in an invalid state. "
|
||||
|
Loading…
Reference in New Issue
Block a user