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()