pyocf: add new error OCF error code to test framework
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
636834dae3
commit
0c8bc4cec5
@ -20,6 +20,7 @@ class OcfErrorCode(IntEnum):
|
||||
OCF_ERR_NO_LOCK = auto()
|
||||
OCF_ERR_METADATA_VER = auto()
|
||||
OCF_ERR_NO_METADATA = auto()
|
||||
OCF_ERR_METADATA_FOUND = auto()
|
||||
OCF_ERR_INVAL_VOLUME_TYPE = auto()
|
||||
OCF_ERR_UNKNOWN = auto()
|
||||
OCF_ERR_TOO_MANY_CACHES = auto()
|
||||
|
@ -62,7 +62,7 @@ def test_start_corrupted_metadata_lba(pyocf_ctx):
|
||||
def test_load_cache_no_preexisting_data(pyocf_ctx):
|
||||
cache_device = Volume(S.from_MiB(30))
|
||||
|
||||
with pytest.raises(OcfError, match="OCF_ERR_START_CACHE_FAIL"):
|
||||
with pytest.raises(OcfError, match="OCF_ERR_NO_METADATA"):
|
||||
cache = Cache.load_from_device(cache_device)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user