Skip to content

Commit

Permalink
Added a requirement for the ClusterIssuer to be present on the hub cl…
Browse files Browse the repository at this point in the history
…uster
  • Loading branch information
martinhesko committed Feb 14, 2024
1 parent 83bf293 commit db9bfa1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions testsuite/tests/mgc/test_external_ca.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@


@pytest.fixture(scope="module")
def cluster_issuer():
def cluster_issuer(hub_openshift):
"""Reference to cluster Let's Encrypt certificate issuer"""
try:
selector("clusterissuer/letsencrypt-staging").object()
selector("clusterissuer/letsencrypt-staging", static_context=hub_openshift.context).object()
except OpenShiftPythonException as exc:
pytest.skip(f"letsencrypt-staging ClusterIssuer is not present on the cluster: {exc}")
return CustomReference(
Expand All @@ -65,6 +65,8 @@ def exposer(base_domain, hub_gateway) -> Exposer:
return DNSPolicyExposer(base_domain, tls_cert=dataclasses.replace(old_cert, chain=old_cert.certificate + root_cert))


# Reduce scope of the base_domain fixture so the test only runs on aws-mz ManagedZone
@pytest.mark.parametrize("base_domain", ["aws-mz"], indirect=True)
def test_smoke_letsencrypt(client):
"""
Tests whether the backend, exposed using the HTTPRoute and Gateway, was exposed correctly,
Expand Down

0 comments on commit db9bfa1

Please sign in to comment.