Merge pull request #326 from Ostrokrzew/upstream

Change error code
This commit is contained in:
Robert Baldyga
2020-01-10 13:38:18 +01:00
committed by GitHub
4 changed files with 8 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ class OcfErrorCode(IntEnum):
OCF_ERR_INVALID_CACHE_MODE = auto()
OCF_ERR_INVALID_CACHE_LINE_SIZE = auto()
OCF_ERR_CACHE_NAME_MISMATCH = auto()
OCF_ERR_INVAL_CACHE_DEV = auto()
class OcfCompletion:

View File

@@ -359,7 +359,7 @@ def test_start_too_small_device(pyocf_ctx, mode, cls):
cache_device = Volume(Size.from_B(20 * 1024 * 1024 - 1))
with pytest.raises(OcfError, match="OCF_ERR_START_CACHE_FAIL"):
with pytest.raises(OcfError, match="OCF_ERR_INVAL_CACHE_DEV"):
Cache.start_on_device(cache_device, cache_mode=mode, cache_line_size=cls)