From 818dacfe89ab9124c7fa78170e26b1013481cf5f Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Wed, 2 Oct 2024 10:40:53 +0200 Subject: [PATCH] pyocf: Disarm error volumes in teardown This prevents obfuscating the actual test errors Signed-off-by: Michal Mielewczyk --- tests/functional/pyocf/types/ctx.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/pyocf/types/ctx.py b/tests/functional/pyocf/types/ctx.py index e6fa60a..46ddabb 100644 --- a/tests/functional/pyocf/types/ctx.py +++ b/tests/functional/pyocf/types/ctx.py @@ -1,5 +1,6 @@ # # Copyright(c) 2019-2022 Intel Corporation +# Copyright(c) 2024 Huawei Technologies # SPDX-License-Identifier: BSD-3-Clause # @@ -113,6 +114,10 @@ class OcfCtx: def stop_caches(self): for cache in self.caches[:]: + try: + cache.get_volume().disarm() + except AttributeError: + pass cache.stop() def exit(self):