Skip to content

Commit e3a6d33

Browse files
committed
fix: cosmetic changes.
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
1 parent 5ddd897 commit e3a6d33

5 files changed

Lines changed: 10 additions & 8 deletions

File tree

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ disruptive: poetry-no-dev ## Run disruptive tests
7171
egress-gateway: poetry-no-dev ## Run egress gateway tests
7272
$(PYTEST) -n4 -m 'egress_gateway' --dist loadfile --enforce $(flags) testsuite/tests/singlecluster/egress/
7373

74-
7574
kuadrantctl: poetry-no-dev ## Run Kuadrantctl tests
7675
$(PYTEST) -n4 --dist loadfile --enforce $(flags) testsuite/tests/kuadrantctl/
7776

testsuite/backend/mockserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def commit(self):
126126
self.cluster,
127127
self.name,
128128
selector=self.match_labels,
129-
ports=[ServicePort(name="api", port=8080, targetPort="api")],
129+
ports=[ServicePort(name="http", port=8080, targetPort="api")],
130130
labels={"app": self.label},
131131
)
132132
self.service.commit()

testsuite/gateway/gateway_api/gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from testsuite.utils import check_condition, asdict, domain_match
1616

1717

18-
class KuadrantGateway(KubernetesObject, Gateway): # pylint: disable=too-many-ancestors
18+
class KuadrantGateway(KubernetesObject, Gateway):
1919
"""Gateway object for Kuadrant"""
2020

2121
# Name of the GatewayClass that is to be used for all the instances

testsuite/gateway/gateway_api/hostname.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def base_domain(self) -> str:
5656
def expose_hostname(self, name, exposable) -> Hostname:
5757
return StaticHostname(
5858
f"{name}.{self.base_domain}",
59-
exposable.get_tls_cert if self.verify is None else lambda: self.verify, # type: ignore
59+
exposable.get_tls_cert if self.verify is None else lambda _hostname: self.verify, # type: ignore
6060
)
6161

6262
def commit(self):

testsuite/tests/singlecluster/conftest.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,20 @@ def pytest_runtest_makereport(item, call): # pylint: disable=unused-argument
175175
outcome = yield
176176
report = outcome.get_result()
177177

178-
if call.when != "call" or not report.passed:
178+
if call.when != "call":
179179
return
180180

181181
client = item.funcargs.get("client")
182-
backend = item.funcargs.get("backend")
183-
if client is None or backend is None or backend.external_hostname is None:
182+
if not isinstance(client, KuadrantClient):
184183
return
185184

186185
denied_ids = set(client.denied_request_ids)
187186
client.denied_request_ids.clear()
188-
if not denied_ids:
187+
188+
backend = item.funcargs.get("backend")
189+
if not report.passed or backend is None or not hasattr(backend, "external_hostname"):
190+
return
191+
if backend.external_hostname is None or not denied_ids:
189192
return
190193

191194
backend_client = backend.external_hostname.client()

0 commit comments

Comments
 (0)