Skip to content

Commit

Permalink
fixed setup fake context lines
Browse files Browse the repository at this point in the history
  • Loading branch information
karkabbage committed Mar 29, 2024
1 parent 1dcf82a commit 7eafae0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 2 additions & 5 deletions control-plane/pkg/reconciler/trigger/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"context"
"testing"

// unsure if below is necessary:
"knative.dev/eventing/pkg/auth"
filteredFactory "knative.dev/pkg/client/injection/kube/informers/factory/filtered"

Expand Down Expand Up @@ -49,8 +48,7 @@ import (

func TestNewController(t *testing.T) {
// ctx, _ := reconcilertesting.SetupFakeContext(t)
ctx, _ := SetupFakeContext(t, SetUpInformerSelector)

ctx, _ := reconcilertesting.SetupFakeContext(t, SetUpInformerSelector)
ctx = clientpool.WithKafkaClientPool(ctx)

controller := NewController(ctx, configmap.NewStaticWatcher(&corev1.ConfigMap{
Expand All @@ -73,8 +71,7 @@ func SetUpInformerSelector(ctx context.Context) context.Context {
}

func TestFilterTriggers(t *testing.T) {
// ctx, _ := reconcilertesting.SetupFakeContext(t)
ctx, _ := SetupFakeContext(t, SetUpInformerSelector)
ctx, _ := reconcilertesting.SetupFakeContext(t, SetUpInformerSelector)

tt := []struct {
name string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package trigger

import (
"context"
"testing"

corev1 "k8s.io/api/core/v1"
Expand All @@ -41,8 +40,7 @@ import (
)

func TestNewNamespacedController(t *testing.T) {
// ctx, _ := reconcilertesting.SetupFakeContext(t)
ctx, _ := SetupFakeContext(t, SetUpInformerSelector)
ctx, _ := reconcilertesting.SetupFakeContext(t, SetUpInformerSelector)

ctx = clientpool.WithKafkaClientPool(ctx)

Expand Down

0 comments on commit 7eafae0

Please sign in to comment.