Skip to content

Commit

Permalink
fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yijie-04 committed Jan 10, 2024
1 parent 695e58c commit efc1cc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions pkg/auth/serviceaccount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
duckv1 "knative.dev/pkg/apis/duck/v1"
kubeclient "knative.dev/pkg/client/injection/kube/client/fake"

"knative.dev/eventing/pkg/apis/sources"

"github.com/google/go-cmp/cmp"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -108,6 +110,9 @@ func TestGetOIDCServiceAccountForResource(t *testing.T) {
Annotations: map[string]string{
"description": "Service Account for OIDC Authentication for Broker \"my-broker\"",
},
Labels: map[string]string{
sources.OIDCLabelKey: "",
},
},
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/broker/trigger/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func SetUpInformerSelector(ctx context.Context) context.Context {
}

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

ctx, _ := SetupFakeContext(t, SetUpInformerSelector)
tt := []struct {
name string
trigger interface{}
Expand Down

0 comments on commit efc1cc3

Please sign in to comment.