From 61a0cccd14bf2a66cde325c903deae6364ce960e Mon Sep 17 00:00:00 2001 From: Lukas Kral Date: Tue, 10 Jun 2025 19:16:56 +0200 Subject: [PATCH] [ST] Fix methods used in the ConnectST Signed-off-by: Lukas Kral --- .../test/java/io/strimzi/systemtest/connect/ConnectST.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/systemtest/src/test/java/io/strimzi/systemtest/connect/ConnectST.java b/systemtest/src/test/java/io/strimzi/systemtest/connect/ConnectST.java index 5fa022e5e7..6134f2e2b4 100644 --- a/systemtest/src/test/java/io/strimzi/systemtest/connect/ConnectST.java +++ b/systemtest/src/test/java/io/strimzi/systemtest/connect/ConnectST.java @@ -562,7 +562,8 @@ void testSecretsWithKafkaConnectWithTlsAndTlsClientAuthentication() { .withType("Opaque") .addToData("ca2.crt", encodedCertMock) .build(); - kubeClient(testStorage.getNamespaceName()).createSecret(secondCertSecret); + + KubeResourceManager.get().createResourceWithWait(secondCertSecret); KafkaConnect connect = KafkaConnectTemplates.kafkaConnectWithFilePlugin(testStorage.getNamespaceName(), testStorage.getClusterName(), 1) .editSpec() @@ -598,7 +599,7 @@ void testSecretsWithKafkaConnectWithTlsAndTlsClientAuthentication() { // This is an internal secret created by the operator with copy of certificates from the trusted certificates secrets specified in the CR String tlsCertSecretName = KafkaConnectResources.internalTlsTrustedCertsSecretName(testStorage.getClusterName()); LOGGER.info("Verifying that tls cert secret {} is created for KafkaConnect truststore", tlsCertSecretName); - Secret tlsCertSecret = kubeClient(testStorage.getNamespaceName()).getSecret(tlsCertSecretName); + Secret tlsCertSecret = KubeResourceManager.get().kubeClient().getClient().secrets().inNamespace(testStorage.getNamespaceName()).withName(tlsCertSecretName).get(); // The secret should contain certificates from both secrets assertThat(tlsCertSecret.getData().containsKey(testStorage.getClusterName() + "-cluster-ca-cert-ca.crt"), is(true)); assertThat(tlsCertSecret.getData().containsKey("my-secret-ca2.crt"), is(true));