From 764b52fa0fb3e20762d2a60feb521294f917e01a Mon Sep 17 00:00:00 2001 From: averevki Date: Mon, 6 Nov 2023 15:51:17 +0100 Subject: [PATCH] Fix tls secret deletion --- testsuite/openshift/objects/gateway_api/gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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": """