Skip to content

Commit 7b72cb8

Browse files
committed
fix: address comment
1 parent 6bcb662 commit 7b72cb8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/conftest.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,16 @@ def cluster_sanity_scope_session(
484484
@pytest.fixture(scope="session")
485485
def fail_if_missing_dependent_operators(admin_client: DynamicClient) -> None:
486486
missing_operators: list[str] = []
487+
csvs = list(
488+
ClusterServiceVersion.get(
489+
dyn_client=admin_client,
490+
namespace=py_config["applications_namespace"],
491+
)
492+
)
487493

488494
for operator_name in py_config.get("dependent_operators", []).split(","):
489495
LOGGER.info(f"Verifying if {operator_name} is installed")
490-
for csv in ClusterServiceVersion.get(
491-
dyn_client=admin_client,
492-
namespace=py_config["applications_namespace"],
493-
):
496+
for csv in csvs:
494497
if csv.name.startswith(operator_name):
495498
if csv.status == csv.Status.SUCCEEDED:
496499
break

0 commit comments

Comments
 (0)