Don't create new logger in SetupFakeContextWithCancel

This commit is contained in:
Tara Gu 2019-09-19 10:44:27 -04:00
parent 833b58597c
commit 2d57ccf028
1 changed files with 1 additions and 2 deletions

View File

@ -25,7 +25,6 @@ import (
"knative.dev/pkg/controller"
"knative.dev/pkg/injection"
logtesting "knative.dev/pkg/logging/testing"
)
// SetupFakeContext sets up the the Context and the fake informers for the tests.
@ -37,7 +36,7 @@ func SetupFakeContext(t *testing.T) (context.Context, []controller.Informer) {
// SetupFakeContextWithCancel sets up the the Context and the fake informers for the tests
// The provided context can be canceled using provided callback.
func SetupFakeContextWithCancel(t *testing.T) (context.Context, context.CancelFunc, []controller.Informer) {
ctx, c := context.WithCancel(logtesting.TestContextWithLogger(t))
ctx, c := context.WithCancel(context.TODO())
ctx = controller.WithEventRecorder(ctx, record.NewFakeRecorder(1000))
ctx, is := injection.Fake.SetupInformers(ctx, &rest.Config{})
return ctx, c, is