From 447ce86938e055265baa85b9dd84947d76fde064 Mon Sep 17 00:00:00 2001 From: Daniel Osypenko Date: Mon, 2 Dec 2024 17:53:05 +0200 Subject: [PATCH] parse_subvolume_ls_output improved Signed-off-by: Daniel Osypenko --- .../functional/odf-cli/test_pvc_stale_volume_cleanup_cli.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/odf-cli/test_pvc_stale_volume_cleanup_cli.py b/tests/functional/odf-cli/test_pvc_stale_volume_cleanup_cli.py index c720d8d2e26..410e327be07 100644 --- a/tests/functional/odf-cli/test_pvc_stale_volume_cleanup_cli.py +++ b/tests/functional/odf-cli/test_pvc_stale_volume_cleanup_cli.py @@ -1,4 +1,6 @@ import logging +from subprocess import CompletedProcess + import pytest from ocs_ci.framework.testlib import ( @@ -74,6 +76,9 @@ def test_pvc_stale_volume_cleanup_cli(self, storageclass_factory, pvc_factory): assert len(stale_volumes) == 0 # No stale volumes available def parse_subvolume_ls_output(self, output): + if isinstance(output, CompletedProcess): + output = output.stdout.decode("utf-8") + subvolumes = [] subvolumes_list = output.strip().split("\n")[1:] for item in subvolumes_list: