Skip to content

Commit

Permalink
Use alternate serviceaccount to verify route connectivity
Browse files Browse the repository at this point in the history
  • Loading branch information
mlabonte-rh committed Jun 25, 2024
1 parent fd29238 commit d97644d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 9 additions & 4 deletions tests/interop/test_validate_edge_site_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ def test_validate_edge_site_reachable(kube_config, openshift_dyn_client):
else:
logger.info(f"EDGE api url : {edge_api_url}")

bearer_token = get_long_live_bearer_token(dyn_client=openshift_dyn_client)
bearer_token = get_long_live_bearer_token(
dyn_client=openshift_dyn_client,
namespace="openshift-gitops",
sub_string="argocd-dex-server-token",
)

if not bearer_token:
assert False, "Bearer token is missing for hub site"
assert False, "Bearer token is missing for argocd-dex-server"

edge_api_response = get_site_response(
site_url=edge_api_url, bearer_token=bearer_token
Expand Down Expand Up @@ -125,10 +130,10 @@ def test_validate_argocd_reachable_edge_site(openshift_dyn_client):
bearer_token = get_long_live_bearer_token(
dyn_client=openshift_dyn_client,
namespace=namespace,
sub_string="openshift-gitops-argocd-server-token",
sub_string="argocd-dex-server-token",
)
if not bearer_token:
err_msg = f"Bearer token is missing for argocd-server in {namespace} namespace"
err_msg = f"Bearer token is missing for argocd-dex-server"
logger.error(f"FAIL: {err_msg}")
assert False, err_msg
else:
Expand Down
13 changes: 9 additions & 4 deletions tests/interop/test_validate_hub_site_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ def test_validate_hub_site_reachable(kube_config, openshift_dyn_client):
else:
logger.info(f"HUB api url : {hub_api_url}")

bearer_token = get_long_live_bearer_token(dyn_client=openshift_dyn_client)
bearer_token = get_long_live_bearer_token(
dyn_client=openshift_dyn_client,
namespace="openshift-gitops",
sub_string="argocd-dex-server-token",
)

if not bearer_token:
assert False, "Bearer token is missing for hub site"
assert False, "Bearer token is missing for argocd-dex-server"

hub_api_response = get_site_response(
site_url=hub_api_url, bearer_token=bearer_token
Expand Down Expand Up @@ -161,11 +166,11 @@ def test_validate_argocd_reachable_hub_site(openshift_dyn_client):
bearer_token = get_long_live_bearer_token(
dyn_client=openshift_dyn_client,
namespace=namespace,
sub_string="openshift-gitops-argocd-server-token",
sub_string="argocd-dex-server-token",
)
if not bearer_token:
err_msg = (
"Bearer token is missing for argocd-server in openshift-gitops namespace"
"Bearer token is missing for argocd-dex-server"
)
logger.error(f"FAIL: {err_msg}")
assert False, err_msg
Expand Down

0 comments on commit d97644d

Please sign in to comment.