From b21cf297006623af8332136c39dc807537351845 Mon Sep 17 00:00:00 2001 From: "pawel.denst" Date: Mon, 4 Sep 2023 11:33:57 +0000 Subject: Improve-CPS-sanity-test Improve-CPS-sanity-test Issue-ID: INT-2263 Signed-off-by: pawel.denst Change-Id: Iab13759245c2f355d68bbf55d1a03087cd6c3d6d --- src/onaptests/steps/onboard/cps.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/onaptests/steps/onboard/cps.py b/src/onaptests/steps/onboard/cps.py index 60e1990..f5820c7 100644 --- a/src/onaptests/steps/onboard/cps.py +++ b/src/onaptests/steps/onboard/cps.py @@ -261,7 +261,10 @@ class CheckPostgressDataBaseConnectionStep(CpsBaseStep): return "Establish connection with Postgress and execute the query" def get_database_credentials(self): - config.load_kube_config() + if settings.IN_CLUSTER: + config.load_incluster_config() + else: + config.load_kube_config(config_file=settings.K8S_CONFIG) api_instance = client.CoreV1Api() try: secret = api_instance.read_namespaced_secret( -- cgit 1.2.3-korg