Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit b66f9e3

Browse files
remove kafkaCluster parameter from testWebhookKafkaTopic()
1 parent 651a2c8 commit b66f9e3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/e2e/kafkatopic_webhook.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"k8s.io/utils/ptr"
2525
)
2626

27-
func testWebhookKafkaTopic(kafkaCluster types.NamespacedName) {
27+
func testWebhookKafkaTopic() {
2828
// temporary section; to be refactored after kubeconfig injection PR
2929
var kubectlOptions k8s.KubectlOptions
3030
var err error
@@ -33,7 +33,8 @@ func testWebhookKafkaTopic(kafkaCluster types.NamespacedName) {
3333
GinkgoT().Fail()
3434
}
3535

36-
kubectlOptions.Namespace = kafkaCluster.Namespace
36+
kubectlOptions.Namespace = koperatorLocalHelmDescriptor.Namespace
37+
kafkaCluster := types.NamespacedName{Name: kafkaClusterName, Namespace: koperatorLocalHelmDescriptor.Namespace}
3738

3839
testWebhookCreateKafkaTopic(kubectlOptions, kafkaCluster)
3940
testWebhookUpdateKafkaTopic(kubectlOptions, kafkaCluster)
@@ -152,7 +153,7 @@ func testWebhookCreateKafkaTopic(kubectlOptions k8s.KubectlOptions, kafkaCluster
152153
Name: kafkaCluster.Name,
153154
Namespace: kafkaCluster.Namespace,
154155
},
155-
Name: overlappingTopicName + "different-cr-name", // Note: This information is relevant to this particular test case.
156+
Name: overlappingTopicName + "-different-cr-name", // Note: This information is relevant to this particular test case.
156157
Namespace: kubectlOptions.Namespace,
157158
Partitions: ptr.To(int32(2)),
158159
ReplicationFactor: ptr.To(int32(2)),
@@ -180,7 +181,7 @@ func testWebhookCreateKafkaTopic(kubectlOptions k8s.KubectlOptions, kafkaCluster
180181
Name: kafkaCluster.Name,
181182
Namespace: kafkaCluster.Namespace,
182183
},
183-
Name: overlappingTopicName + "different-cr-name", // Note: This information is relevant to this particular test case.
184+
Name: overlappingTopicName + "-different-cr-name", // Note: This information is relevant to this particular test case.
184185
Namespace: kubectlOptions.Namespace,
185186
Partitions: ptr.To(int32(2)),
186187
ReplicationFactor: ptr.To(int32(2)),

tests/e2e/koperator_suite_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
. "github.com/onsi/ginkgo/v2"
2525
. "github.com/onsi/gomega"
2626
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
27-
"k8s.io/apimachinery/pkg/types"
2827
)
2928

3029
func TestKoperator(t *testing.T) {
@@ -60,7 +59,7 @@ var _ = When("Testing e2e test altogether", Ordered, func() {
6059
testInstall()
6160
testInstallZookeeperCluster()
6261
testInstallKafkaCluster("../../config/samples/simplekafkacluster.yaml")
63-
testWebhookKafkaTopic(types.NamespacedName{Name: kafkaClusterName, Namespace: koperatorLocalHelmDescriptor.Namespace})
62+
testWebhookKafkaTopic()
6463
testProduceConsumeInternal()
6564
testUninstallKafkaCluster()
6665
testInstallKafkaCluster("../../config/samples/simplekafkacluster_ssl.yaml")

0 commit comments

Comments
 (0)