Skip to content

Commit

Permalink
[system test] - re-write some tests to use pattern with trusted certi… (
Browse files Browse the repository at this point in the history
strimzi#10475)

Signed-off-by: see-quick <maros.orsak159@gmail.com>
  • Loading branch information
see-quick authored Aug 22, 2024
1 parent 13be378 commit 04c59ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ void testConnectTlsAuthWithWeirdUserName() {
.addToConfig("value.converter", "org.apache.kafka.connect.storage.StringConverter")
.withNewTls()
.withTrustedCertificates(new CertSecretSourceBuilder()
.withCertificate("ca.crt")
.withPattern("*.crt")
.withSecretName(KafkaResources.clusterCaCertificateSecretName(testStorage.getClusterName()))
.build())
.endTls()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,9 @@ void testKMM2RollAfterSecretsCertsUpdateScramSha() {
certSecretSource.setCertificate("ca.crt");
certSecretSource.setSecretName(KafkaResources.clusterCaCertificateSecretName(testStorage.getSourceClusterName()));

// Initialize CertSecretSource with certificate and secret names for target
// Initialize CertSecretSource with certificate and secret names for target (using pattern)
CertSecretSource certSecretTarget = new CertSecretSource();
certSecretTarget.setCertificate("ca.crt");
certSecretTarget.setPattern("*.crt");
certSecretTarget.setSecretName(KafkaResources.clusterCaCertificateSecretName(testStorage.getTargetClusterName()));

resourceManager.createResourceWithWait(KafkaMirrorMaker2Templates.kafkaMirrorMaker2(testStorage, 1, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,10 @@ void testMirrorMaker2() {
.withAlias(testStorage.getTargetClusterName())
.withConfig(connectorConfig)
.withBootstrapServers(KafkaResources.tlsBootstrapAddress(targetKafkaCluster))
// this is for kafka tls connection
// this is for kafka tls connection (using pattern)
.withNewTls()
.withTrustedCertificates(new CertSecretSourceBuilder()
.withCertificate("ca.crt")
.withPattern("*.crt")
.withSecretName(KafkaResources.clusterCaCertificateSecretName(targetKafkaCluster))
.build())
.endTls()
Expand Down

0 comments on commit 04c59ea

Please sign in to comment.