diff --git a/operator/pkg/preflight/upgrade_test.go b/operator/pkg/preflight/upgrade_test.go index 5406dcaaf2..0f9fea8e04 100644 --- a/operator/pkg/preflight/upgrade_test.go +++ b/operator/pkg/preflight/upgrade_test.go @@ -218,11 +218,6 @@ func TestUpgradeChecker_Preflight(t *testing.T) { repo := FakeRepo{ channel: tc.channel, } - // Adding the wait to avoid the error "the cache is not started, can - // not read objects". - if !mgr.GetCache().WaitForCacheSync(ctx) { - t.Fatalf("the cache in the test manager did not sync") - } u := NewUpgradeChecker(client, &repo) err := u.Preflight(ctx, tc.cc) asserts.AssertErrorIsExpected(t, err, tc.err) diff --git a/pkg/controller/kccmanager/nocache/clientbuilder.go b/pkg/controller/kccmanager/nocache/clientbuilder.go index e853e8e69e..c0dcbc9d10 100644 --- a/pkg/controller/kccmanager/nocache/clientbuilder.go +++ b/pkg/controller/kccmanager/nocache/clientbuilder.go @@ -20,5 +20,6 @@ import ( ) var NoCacheClientFunc = func(config *rest.Config, options client.Options) (client.Client, error) { + options.Cache = nil return client.New(config, options) }