Skip to content

Commit

Permalink
tests: Update relations to oidc (#219)
Browse files Browse the repository at this point in the history
Closes #218
  • Loading branch information
orfeas-k authored Aug 6, 2024
1 parent 397eaff commit 5fe4c79
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ async def test_relations(ops_test: OpsTest):
channel=OIDC_GATEKEEPER_CHANNEL,
config=OIDC_GATEKEEPER_CONFIG,
)
await ops_test.model.add_relation(OIDC_GATEKEEPER, DEX_AUTH_APP_NAME)
await ops_test.model.add_relation(
f"{OIDC_GATEKEEPER}:dex-oidc-config", f"{DEX_AUTH_APP_NAME}:dex-oidc-config"
)
await ops_test.model.add_relation(
f"{OIDC_GATEKEEPER}:oidc-client", f"{DEX_AUTH_APP_NAME}:oidc-client"
)
await ops_test.model.add_relation(f"{ISTIO_PILOT}:ingress", f"{DEX_AUTH_APP_NAME}:ingress")
await ops_test.model.add_relation(
f"{ISTIO_PILOT}:ingress-auth",
Expand All @@ -155,15 +160,6 @@ async def test_relations(ops_test: OpsTest):
await ops_test.model.add_relation(KUBEFLOW_PROFILES, KUBEFLOW_DASHBOARD)
await ops_test.model.add_relation(f"{ISTIO_PILOT}:ingress", f"{KUBEFLOW_DASHBOARD}:ingress")

# Set public-url for oidc
# Leaving the default value of Dex's Kubernetes Service temporarily
# FIXME: remove this configuration option after canonical/oidc-gatekeeper-operator/pull/164 and
# canonical/oidc-gatekeeper-operator/pull/163 get merged
# After that, we should integrate dex-auth and oidc-gatekeeper.
# See canonical/oidc-gatekeeper-operator#157 for more details
public_url = f"http://{DEX_AUTH_APP_NAME}.{ops_test.model_name}.svc:5556"
await ops_test.model.applications[OIDC_GATEKEEPER].set_config({"public-url": public_url})

await ops_test.model.wait_for_idle(
apps=[
DEX_AUTH_APP_NAME,
Expand Down

0 comments on commit 5fe4c79

Please sign in to comment.