From ba9942b76457e9beb3d09228040e561866cd845d Mon Sep 17 00:00:00 2001 From: Daniel Osypenko Date: Mon, 17 Jun 2024 19:46:44 +0300 Subject: [PATCH] 0.24 Signed-off-by: Daniel Osypenko --- ocs_ci/deployment/hosted_cluster.py | 4 +++- tests/conftest.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ocs_ci/deployment/hosted_cluster.py b/ocs_ci/deployment/hosted_cluster.py index b1fca070b247..80a278051efb 100644 --- a/ocs_ci/deployment/hosted_cluster.py +++ b/ocs_ci/deployment/hosted_cluster.py @@ -326,10 +326,12 @@ def get_kubeconfig_path(self, cluster_name): Returns: str: Path to the kubeconfig file """ + if not self.kubeconfig_paths: + self.download_hosted_clusters_kubeconfig_files() for kubeconfig_path in self.kubeconfig_paths: if cluster_name in kubeconfig_path: return kubeconfig_path - return None + return def deploy_multiple_odf_clients(self): """ diff --git a/tests/conftest.py b/tests/conftest.py index 80265e488674..e3e9ef171513 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7653,7 +7653,7 @@ def factory( ) kubeconfig_path = hosted_clients_obj.get_kubeconfig_path(cluster_name) log.info(f"Kubeconfig path: {kubeconfig_path}") - def_client_config_dict.get("RUN").update( + def_client_config_dict.setdefault("RUN", {}).update( {"kubeconfig": kubeconfig_path} ) cluster_config = Config()