aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests
diff options
context:
space:
mode:
authorpawel.denst <pawel.denst@external.t-mobile.pl>2023-09-04 11:33:57 +0000
committerpawel.denst <pawel.denst@external.t-mobile.pl>2023-09-04 11:33:57 +0000
commitb21cf297006623af8332136c39dc807537351845 (patch)
treee426e4491bd5bba66e933a6fbc1bae425243ca0a /src/onaptests
parentda29da250e5badd022c1dfb977c2d8b91f8837c8 (diff)
Improve-CPS-sanity-test
Improve-CPS-sanity-test Issue-ID: INT-2263 Signed-off-by: pawel.denst <pawel.denst@external.t-mobile.pl> Change-Id: Iab13759245c2f355d68bbf55d1a03087cd6c3d6d
Diffstat (limited to 'src/onaptests')
-rw-r--r--src/onaptests/steps/onboard/cps.py5
1 files changed, 4 insertions, 1 deletions
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(