Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi committed Oct 9, 2024
1 parent b110c48 commit 874d306
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions control-plane/pkg/apis/sources/v1/kafka_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

bindingsv1beta1 "knative.dev/eventing-kafka-broker/control-plane/pkg/apis/bindings/v1beta1"
"knative.dev/pkg/apis"
duckv1 "knative.dev/pkg/apis/duck/v1"

bindingsv1 "knative.dev/eventing-kafka-broker/control-plane/pkg/apis/bindings/v1"
)

func TestKafka_Validate(t *testing.T) {
Expand All @@ -44,7 +45,7 @@ func TestKafka_Validate(t *testing.T) {
ks: &KafkaSource{
Spec: KafkaSourceSpec{
Topics: []string{"test-topic"},
KafkaAuthSpec: bindingsv1beta1.KafkaAuthSpec{},
KafkaAuthSpec: bindingsv1.KafkaAuthSpec{},
ConsumerGroup: "ks-group",
SourceSpec: duckv1.SourceSpec{
Sink: NewSourceSinkReference(),
Expand All @@ -58,7 +59,7 @@ func TestKafka_Validate(t *testing.T) {
name: "no topics",
ks: &KafkaSource{
Spec: KafkaSourceSpec{
KafkaAuthSpec: bindingsv1beta1.KafkaAuthSpec{
KafkaAuthSpec: bindingsv1.KafkaAuthSpec{
BootstrapServers: []string{"kafka:9092"},
},
ConsumerGroup: "ks-group",
Expand All @@ -75,7 +76,7 @@ func TestKafka_Validate(t *testing.T) {
ks: &KafkaSource{
Spec: KafkaSourceSpec{
Topics: []string{"test-topic"},
KafkaAuthSpec: bindingsv1beta1.KafkaAuthSpec{
KafkaAuthSpec: bindingsv1.KafkaAuthSpec{
BootstrapServers: []string{"kafka:9092"},
},
Ordering: &badOrdering,
Expand All @@ -93,7 +94,7 @@ func TestKafka_Validate(t *testing.T) {
ks: &KafkaSource{
Spec: KafkaSourceSpec{
Topics: []string{"test-topic"},
KafkaAuthSpec: bindingsv1beta1.KafkaAuthSpec{
KafkaAuthSpec: bindingsv1.KafkaAuthSpec{
BootstrapServers: []string{"kafka:9092"},
},
Ordering: &validOrdering,
Expand All @@ -111,7 +112,7 @@ func TestKafka_Validate(t *testing.T) {
ks: &KafkaSource{
Spec: KafkaSourceSpec{
Topics: []string{"test-topic"},
KafkaAuthSpec: bindingsv1beta1.KafkaAuthSpec{
KafkaAuthSpec: bindingsv1.KafkaAuthSpec{
BootstrapServers: []string{"kafka:9092"},
},
InitialOffset: badInitialOffset,
Expand Down

0 comments on commit 874d306

Please sign in to comment.