Skip to content

Commit

Permalink
Override Gateway for metrics tests
Browse files Browse the repository at this point in the history
- It edits Authorino, which is now session -> need to descope gateway to module
  • Loading branch information
pehala committed Apr 10, 2024
1 parent ee481e4 commit 5f9ea18
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions testsuite/tests/kuadrant/authorino/metrics/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pytest
from openshift_client import selector

from testsuite.gateway.envoy import Envoy
from testsuite.openshift.config_map import ConfigMap
from testsuite.openshift.metrics import ServiceMonitor, MetricsEndpoint, Prometheus

Expand Down Expand Up @@ -37,6 +38,22 @@ def prometheus(request, openshift):
return pytest.skip("Skipping metrics tests as query route is not properly configured")


@pytest.fixture(scope="module")
def gateway(request, authorino, openshift, blame, label, testconfig) -> Envoy:
"""Deploys Envoy that wires up the Backend behind the reverse-proxy and Authorino instance"""
gw = Envoy(
openshift,
blame("gw"),
authorino,
testconfig["service_protection"]["envoy"]["image"],
labels={"app": label},
)
request.addfinalizer(gw.delete)
gw.commit()
gw.wait_for_ready(timeout=10 * 60)
return gw


@pytest.fixture(scope="module")
def authorino(authorino, module_label):
"""Label Authorino controller-metrics service for the proper discovery"""
Expand Down

0 comments on commit 5f9ea18

Please sign in to comment.