Skip to content

Commit

Permalink
parse_subvolume_ls_output improved
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Osypenko <[email protected]>
  • Loading branch information
DanielOsypenko authored and openshift-cherrypick-robot committed Dec 11, 2024
1 parent 200a269 commit 447ce86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/functional/odf-cli/test_pvc_stale_volume_cleanup_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import logging
from subprocess import CompletedProcess

import pytest

from ocs_ci.framework.testlib import (
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 447ce86

Please sign in to comment.