Skip to content

Commit

Permalink
Merge pull request #376 from pehala/fix_mgc_scope
Browse files Browse the repository at this point in the history
Fix MGC fixtures scope
  • Loading branch information
pehala authored Apr 16, 2024
2 parents eabbe09 + 84c7337 commit 4481a40
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions testsuite/tests/mgc/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from openshift_client import selector
from weakget import weakget

from testsuite.backend.httpbin import Httpbin
from testsuite.gateway import CustomReference, GatewayRoute, Exposer
from testsuite.policy.dns_policy import DNSPolicy
from testsuite.gateway.gateway_api.gateway import MGCGateway
Expand Down Expand Up @@ -131,3 +132,15 @@ def hub_policies_commit(request, hub_gateway, dns_policy, tls_policy):
if component is not None:
request.addfinalizer(component.delete)
component.commit()


# Descope fixtures


@pytest.fixture(scope="module")
def backend(request, openshift, blame, label):
"""Deploys Httpbin backend"""
httpbin = Httpbin(openshift, blame("httpbin"), label)
request.addfinalizer(httpbin.delete)
httpbin.commit()
return httpbin

0 comments on commit 4481a40

Please sign in to comment.