diff --git a/testsuite/openshift/objects/gateway_api/gateway.py b/testsuite/openshift/objects/gateway_api/gateway.py index e8f75e13..b673a68f 100644 --- a/testsuite/openshift/objects/gateway_api/gateway.py +++ b/testsuite/openshift/objects/gateway_api/gateway.py @@ -124,8 +124,8 @@ def get_tls_cert(self) -> Certificate: def delete_tls_secret(self): """Deletes secret with TLS certificate used by the gateway""" - tls_secret = self.openshift.get_secret(self.cert_secret_name) - tls_secret.delete(ignore_not_found=True) + with self.openshift.context: + selector(f"secret/{self.cert_secret_name}").delete(ignore_not_found=True) def get_spoke_gateway(self, spokes: dict[str, OpenShiftClient]) -> "MGCGateway": """