Skip to content

Commit

Permalink
remove kafkaCluster parameter from testWebhookKafkaTopic()
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaialexandrescu committed Sep 5, 2023
1 parent 651a2c8 commit b66f9e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 5 additions & 4 deletions tests/e2e/kafkatopic_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/utils/ptr"
)

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

kubectlOptions.Namespace = kafkaCluster.Namespace
kubectlOptions.Namespace = koperatorLocalHelmDescriptor.Namespace
kafkaCluster := types.NamespacedName{Name: kafkaClusterName, Namespace: koperatorLocalHelmDescriptor.Namespace}

testWebhookCreateKafkaTopic(kubectlOptions, kafkaCluster)
testWebhookUpdateKafkaTopic(kubectlOptions, kafkaCluster)
Expand Down Expand Up @@ -152,7 +153,7 @@ func testWebhookCreateKafkaTopic(kubectlOptions k8s.KubectlOptions, kafkaCluster
Name: kafkaCluster.Name,
Namespace: kafkaCluster.Namespace,
},
Name: overlappingTopicName + "different-cr-name", // Note: This information is relevant to this particular test case.
Name: overlappingTopicName + "-different-cr-name", // Note: This information is relevant to this particular test case.
Namespace: kubectlOptions.Namespace,
Partitions: ptr.To(int32(2)),
ReplicationFactor: ptr.To(int32(2)),
Expand Down Expand Up @@ -180,7 +181,7 @@ func testWebhookCreateKafkaTopic(kubectlOptions k8s.KubectlOptions, kafkaCluster
Name: kafkaCluster.Name,
Namespace: kafkaCluster.Namespace,
},
Name: overlappingTopicName + "different-cr-name", // Note: This information is relevant to this particular test case.
Name: overlappingTopicName + "-different-cr-name", // Note: This information is relevant to this particular test case.
Namespace: kubectlOptions.Namespace,
Partitions: ptr.To(int32(2)),
ReplicationFactor: ptr.To(int32(2)),
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/koperator_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)

func TestKoperator(t *testing.T) {
Expand Down Expand Up @@ -60,7 +59,7 @@ var _ = When("Testing e2e test altogether", Ordered, func() {
testInstall()
testInstallZookeeperCluster()
testInstallKafkaCluster("../../config/samples/simplekafkacluster.yaml")
testWebhookKafkaTopic(types.NamespacedName{Name: kafkaClusterName, Namespace: koperatorLocalHelmDescriptor.Namespace})
testWebhookKafkaTopic()
testProduceConsumeInternal()
testUninstallKafkaCluster()
testInstallKafkaCluster("../../config/samples/simplekafkacluster_ssl.yaml")
Expand Down

0 comments on commit b66f9e3

Please sign in to comment.