Skip to content
Snippets Groups Projects
Verified Commit 7aad083d authored by Varac's avatar Varac
Browse files

Use proper KUBECONFIG file for helmrelease test

parent f1a71f0e
No related branches found
No related tags found
No related merge requests found
import pytest
from kubernetes import client, config
from kubernetes.client.rest import ApiException
import os
def get_release(name, namespace, api):
......@@ -26,7 +27,7 @@ def get_release(name, namespace, api):
@pytest.mark.helmreleases
def test_helmreleases():
def test_helmreleases(host):
"""Checks if all desired HelmReleases installed by weave flux are in
DEPLOYED state.
"""
......@@ -35,7 +36,10 @@ def test_helmreleases():
'oas-apps': ['nextcloud']
}
config.load_kube_config()
cluster_dir = os.path.dirname(os.environ.get("INVENTORY"))
kubeconfig = os.path.join(cluster_dir, 'secrets',
'kube_config_cluster.yml')
config.load_kube_config(config_file=kubeconfig)
customObjects = client.CustomObjectsApi()
failed = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment