Skip to content

Commit a401ca2

Browse files
committed
Fix minor namespace bug with NewFakeOperator
Signed-off-by: Vu Dinh <[email protected]>
1 parent b0be45d commit a401ca2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/controller/operators/catalog/operator_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ func TestSyncCatalogSources(t *testing.T) {
512512
Namespace: "cool-namespace",
513513
UID: types.UID("configmap-uid"),
514514
ResourceVersion: "resource-version",
515-
LastUpdateTime: now,
515+
LastUpdateTime: now,
516516
},
517517
RegistryServiceStatus: nil,
518518
},
@@ -854,7 +854,7 @@ func NewFakeOperator(ctx context.Context, namespace string, watchedNamespaces []
854854
var sharedInformers []cache.SharedIndexInformer
855855
for _, ns := range watchedNamespaces {
856856
if ns != namespace {
857-
_, err := opClientFake.KubernetesInterface().CoreV1().Namespaces().Create(&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}})
857+
_, err := opClientFake.KubernetesInterface().CoreV1().Namespaces().Create(&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}})
858858
if err != nil {
859859
return nil, err
860860
}
@@ -917,7 +917,7 @@ func NewFakeOperator(ctx context.Context, namespace string, watchedNamespaces []
917917
reconciler: config.reconciler,
918918
clientAttenuator: scoped.NewClientAttenuator(logger, &rest.Config{}, opClientFake, clientFake),
919919
serviceAccountQuerier: scoped.NewUserDefinedServiceAccountQuerier(logger, clientFake),
920-
catsrcQueueSet: queueinformer.NewEmptyResourceQueueSet(),
920+
catsrcQueueSet: queueinformer.NewEmptyResourceQueueSet(),
921921
}
922922
op.sources = grpc.NewSourceStore(config.logger, 1*time.Second, 5*time.Second, op.syncSourceState)
923923
if op.reconciler == nil {

0 commit comments

Comments
 (0)