Test detaching cache twice
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
committed by
Rafal Stefanowski
parent
c95f396ba9
commit
f8a0f88892
@@ -63,6 +63,18 @@ def test_attach_cache_twice(pyocf_ctx):
|
||||
cache.stop()
|
||||
|
||||
|
||||
def test_detach_cache_twice(pyocf_ctx):
|
||||
cache_device = RamVolume(Size.from_MiB(50))
|
||||
cache = Cache.start_on_device(cache_device)
|
||||
|
||||
cache.detach_device()
|
||||
|
||||
with pytest.raises(OcfError, match="Detaching cache device failed"):
|
||||
cache.detach_device()
|
||||
|
||||
cache.stop()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("cls", CacheLineSize)
|
||||
@pytest.mark.parametrize("mode", [CacheMode.WB, CacheMode.WT, CacheMode.WO])
|
||||
@pytest.mark.parametrize("new_cache_size", [80, 120])
|
||||
|
||||
Reference in New Issue
Block a user