Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
fix build issues
Browse files Browse the repository at this point in the history
Signed-off-by: Calum Murray <[email protected]>
  • Loading branch information
Cali0707 committed Jan 18, 2024
1 parent ea14259 commit e5b912e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/source/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/Shopify/sarama"
"go.uber.org/zap"

"knative.dev/eventing/pkg/eventingtls"
"knative.dev/eventing/pkg/metrics/source"
duckv1 "knative.dev/pkg/apis/duck/v1"
"knative.dev/pkg/logging"
Expand Down Expand Up @@ -99,7 +100,7 @@ func NewAdapter(ctx context.Context, processed adapter.EnvConfigAccessor, sink d
reporter: reporter,
logger: logger,
keyTypeMapper: getKeyTypeMapper(config.KeyType),
dispatcher: kncloudevents.NewDispatcher(oidcTokenProvider),
dispatcher: kncloudevents.NewDispatcher(eventingtls.ClientConfig{}, oidcTokenProvider),
}
}
func (a *Adapter) GetConsumerGroup() string {
Expand Down
6 changes: 6 additions & 0 deletions pkg/source/adapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import (
"context"
"encoding/json"
"io"
"knative.dev/eventing/pkg/auth"
"knative.dev/eventing/pkg/eventingtls"
"knative.dev/eventing/pkg/kncloudevents"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -346,6 +349,8 @@ func TestPostMessage_ServeHTTP_binary_mode(t *testing.T) {

ctx, _ := fakekubeclient.With(context.Background())

oidcTokenProvider := auth.NewOIDCTokenProvider(ctx)

a := &Adapter{
config: &AdapterConfig{
EnvConfig: adapter.EnvConfig{
Expand All @@ -360,6 +365,7 @@ func TestPostMessage_ServeHTTP_binary_mode(t *testing.T) {
logger: zap.NewNop().Sugar(),
reporter: statsReporter,
keyTypeMapper: getKeyTypeMapper(tc.keyTypeMapper),
dispatcher: kncloudevents.NewDispatcher(eventingtls.ClientConfig{}, oidcTokenProvider),
}

_, err = a.Handle(ctx, tc.message)
Expand Down

0 comments on commit e5b912e

Please sign in to comment.