Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Remove hardcoded broker class from tests #3898

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/e2e_new/broker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import (
"knative.dev/reconciler-test/pkg/k8s"
"knative.dev/reconciler-test/pkg/knative"

"knative.dev/eventing-kafka-broker/control-plane/pkg/kafka"
"knative.dev/eventing-kafka-broker/test/e2e_new/single_partition_config"
"knative.dev/eventing-kafka-broker/test/rekt/features"
"knative.dev/eventing/test/rekt/features/broker"
brokereventingfeatures "knative.dev/eventing/test/rekt/features/broker"
"knative.dev/eventing/test/rekt/features/oidc"
brokerresources "knative.dev/eventing/test/rekt/resources/broker"

"knative.dev/eventing-kafka-broker/test/e2e_new/single_partition_config"
"knative.dev/eventing-kafka-broker/test/rekt/features"
)

const (
Expand Down Expand Up @@ -263,7 +263,7 @@ func InstallBroker(brokerName string) *feature.Feature {
f.Setup("install one partition configuration", install)
f.Setup("install kafka broker", brokerresources.Install(
brokerName,
brokerresources.WithBrokerClass(kafka.BrokerClass),
brokerresources.WithBrokerClass(brokerresources.EnvCfg.BrokerClass),
brokerresources.WithConfig(cmName),
))
f.Requirement("kafka broker is ready", brokerresources.IsReady(brokerName))
Expand Down
16 changes: 8 additions & 8 deletions test/e2e_new/dls_extensions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import (

cloudevents "github.com/cloudevents/sdk-go/v2"
cetest "github.com/cloudevents/sdk-go/v2/test"
"knative.dev/eventing-kafka-broker/control-plane/pkg/kafka"
"knative.dev/eventing-kafka-broker/test/e2e_new/single_partition_config"
"knative.dev/eventing/test/rekt/resources/broker"
"knative.dev/eventing/test/rekt/resources/trigger"
"knative.dev/pkg/system"
Expand All @@ -41,6 +39,8 @@ import (
"knative.dev/reconciler-test/pkg/k8s"
"knative.dev/reconciler-test/pkg/knative"
"knative.dev/reconciler-test/pkg/resources/service"

"knative.dev/eventing-kafka-broker/test/e2e_new/single_partition_config"
)

func TestDeadLetterSinkExtensions(t *testing.T) {
Expand Down Expand Up @@ -77,7 +77,7 @@ func SubscriberUnreachable() *feature.Feature {
f.Setup("install one partition configuration", install)
f.Setup("install broker", broker.Install(
brokerName,
broker.WithBrokerClass(kafka.BrokerClass),
broker.WithBrokerClass(broker.EnvCfg.BrokerClass),
broker.WithConfig(cmName),
))
f.Setup("broker is ready", broker.IsReady(brokerName))
Expand Down Expand Up @@ -129,7 +129,7 @@ func SubscriberReturnedErrorNoData() *feature.Feature {
f.Setup("install one partition configuration", install)
f.Setup("install broker", broker.Install(
brokerName,
broker.WithBrokerClass(kafka.BrokerClass),
broker.WithBrokerClass(broker.EnvCfg.BrokerClass),
))

f.Setup("broker is ready", broker.IsReady(brokerName))
Expand Down Expand Up @@ -192,7 +192,7 @@ func SubscriberReturnedErrorSmallData() *feature.Feature {
f.Setup("install one partition configuration", install)
f.Setup("install broker", broker.Install(
brokerName,
broker.WithBrokerClass(kafka.BrokerClass),
broker.WithBrokerClass(broker.EnvCfg.BrokerClass),
broker.WithConfig(cmName),
))
f.Setup("broker is ready", broker.IsReady(brokerName))
Expand Down Expand Up @@ -257,7 +257,7 @@ func SubscriberReturnedErrorLargeData() *feature.Feature {
f.Setup("install one partition configuration", install)
f.Setup("install broker", broker.Install(
brokerName,
broker.WithBrokerClass(kafka.BrokerClass),
broker.WithBrokerClass(broker.EnvCfg.BrokerClass),
broker.WithConfig(cmName),
))
f.Setup("broker is ready", broker.IsReady(brokerName))
Expand Down Expand Up @@ -323,7 +323,7 @@ func SubscriberReturnedHtmlWebpage() *feature.Feature {
f.Setup("install one partition configuration", install)
f.Setup("install broker", broker.Install(
brokerName,
broker.WithBrokerClass(kafka.BrokerClass),
broker.WithBrokerClass(broker.EnvCfg.BrokerClass),
broker.WithConfig(cmName),
))
f.Setup("broker is ready", broker.IsReady(brokerName))
Expand Down Expand Up @@ -388,7 +388,7 @@ func SubscriberReturnedCustomExtensionHeader() *feature.Feature {
f.Setup("install one partition configuration", install)
f.Setup("install broker", broker.Install(
brokerName,
broker.WithBrokerClass(kafka.BrokerClass),
broker.WithBrokerClass(broker.EnvCfg.BrokerClass),
broker.WithConfig(cmName),
))
f.Setup("broker is ready", broker.IsReady(brokerName))
Expand Down
6 changes: 3 additions & 3 deletions test/e2e_new/new_trigger_filters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"knative.dev/reconciler-test/pkg/k8s"
"knative.dev/reconciler-test/pkg/knative"

"knative.dev/eventing-kafka-broker/control-plane/pkg/kafka"
"knative.dev/eventing-kafka-broker/test/e2e_new/single_partition_config"
newfilters "knative.dev/eventing/test/rekt/features/new_trigger_filters"
"knative.dev/eventing/test/rekt/resources/broker"

"knative.dev/eventing-kafka-broker/test/e2e_new/single_partition_config"
)

func TestNewTriggerFilters(t *testing.T) {
Expand All @@ -55,7 +55,7 @@ func InstallKafkaBrokerStepFn(brokerName string) feature.StepFn {
install(ctx, t)
broker.Install(
brokerName,
broker.WithBrokerClass(kafka.BrokerClass),
broker.WithBrokerClass(broker.EnvCfg.BrokerClass),
broker.WithConfig(cmName),
)(ctx, t)
}
Expand Down
Loading