Skip to content

Commit 7b3635f

Browse files
authored
[ST] Fix methods used in the ConnectST (#11523)
1 parent 67a5004 commit 7b3635f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

systemtest/src/test/java/io/strimzi/systemtest/connect/ConnectST.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ void testSecretsWithKafkaConnectWithTlsAndTlsClientAuthentication() {
562562
.withType("Opaque")
563563
.addToData("ca2.crt", encodedCertMock)
564564
.build();
565-
kubeClient(testStorage.getNamespaceName()).createSecret(secondCertSecret);
565+
566+
KubeResourceManager.get().createResourceWithWait(secondCertSecret);
566567

567568
KafkaConnect connect = KafkaConnectTemplates.kafkaConnectWithFilePlugin(testStorage.getNamespaceName(), testStorage.getClusterName(), 1)
568569
.editSpec()
@@ -598,7 +599,7 @@ void testSecretsWithKafkaConnectWithTlsAndTlsClientAuthentication() {
598599
// This is an internal secret created by the operator with copy of certificates from the trusted certificates secrets specified in the CR
599600
String tlsCertSecretName = KafkaConnectResources.internalTlsTrustedCertsSecretName(testStorage.getClusterName());
600601
LOGGER.info("Verifying that tls cert secret {} is created for KafkaConnect truststore", tlsCertSecretName);
601-
Secret tlsCertSecret = kubeClient(testStorage.getNamespaceName()).getSecret(tlsCertSecretName);
602+
Secret tlsCertSecret = KubeResourceManager.get().kubeClient().getClient().secrets().inNamespace(testStorage.getNamespaceName()).withName(tlsCertSecretName).get();
602603
// The secret should contain certificates from both secrets
603604
assertThat(tlsCertSecret.getData().containsKey(testStorage.getClusterName() + "-cluster-ca-cert-ca.crt"), is(true));
604605
assertThat(tlsCertSecret.getData().containsKey("my-secret-ca2.crt"), is(true));

0 commit comments

Comments
 (0)