File tree Expand file tree Collapse file tree
staticpod/controller/guard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,18 @@ type FakeInfrastructureSharedInformer struct {
6262 HasSynced_ bool
6363}
6464
65+ type fakeSharedIndexInformerDone struct {
66+ synced chan struct {}
67+ }
68+
69+ func (fd * fakeSharedIndexInformerDone ) Name () string {
70+ return "FakeSharedIndexInformer"
71+ }
72+
73+ func (fd * fakeSharedIndexInformerDone ) Done () <- chan struct {} {
74+ return fd .synced
75+ }
76+
6577func (i FakeInfrastructureSharedInformer ) RemoveEventHandler (handle cache.ResourceEventHandlerRegistration ) error {
6678 //TODO implement me
6779 panic ("implement me" )
@@ -88,7 +100,14 @@ func (i FakeInfrastructureSharedInformer) GetController() cache.Controller {
88100func (i FakeInfrastructureSharedInformer ) Run (stopCh <- chan struct {}) {}
89101func (i FakeInfrastructureSharedInformer ) RunWithContext (ctx context.Context ) {}
90102func (i FakeInfrastructureSharedInformer ) HasSynced () bool { return i .HasSynced_ }
91- func (i FakeInfrastructureSharedInformer ) LastSyncResourceVersion () string { return "" }
103+ func (i FakeInfrastructureSharedInformer ) HasSyncedChecker () cache.DoneChecker {
104+ ch := make (chan struct {})
105+ if i .HasSynced_ {
106+ close (ch )
107+ }
108+ return & fakeSharedIndexInformerDone {synced : ch }
109+ }
110+ func (i FakeInfrastructureSharedInformer ) LastSyncResourceVersion () string { return "" }
92111func (i FakeInfrastructureSharedInformer ) SetWatchErrorHandler (handler cache.WatchErrorHandler ) error {
93112 return nil
94113}
Original file line number Diff line number Diff line change @@ -69,6 +69,24 @@ func (fakeSharedIndexInformer) HasSynced() bool {
6969 return true
7070}
7171
72+ type fakeSharedIndexInformerDone struct {
73+ synced chan struct {}
74+ }
75+
76+ func (fd * fakeSharedIndexInformerDone ) Name () string {
77+ return "FakeSharedIndexInformer"
78+ }
79+
80+ func (fd * fakeSharedIndexInformerDone ) Done () <- chan struct {} {
81+ return fd .synced
82+ }
83+
84+ func (fakeSharedIndexInformer ) HasSyncedChecker () cache.DoneChecker {
85+ ch := make (chan struct {})
86+ close (ch )
87+ return & fakeSharedIndexInformerDone {synced : ch }
88+ }
89+
7290func (fakeSharedIndexInformer ) LastSyncResourceVersion () string {
7391 panic ("implement me" )
7492}
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
1313 "github.com/stretchr/testify/require"
1414 corev1 "k8s.io/api/core/v1"
1515 apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
16- "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1"
16+ v1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1"
1717 "k8s.io/apimachinery/pkg/api/errors"
1818 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1919 "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
@@ -756,6 +756,24 @@ func (d *lockStepDeployer) HasSynced() bool {
756756 return true
757757}
758758
759+ type fakeSharedIndexInformerDone struct {
760+ synced chan struct {}
761+ }
762+
763+ func (fd * fakeSharedIndexInformerDone ) Name () string {
764+ return "FakeSharedIndexInformer"
765+ }
766+
767+ func (fd * fakeSharedIndexInformerDone ) Done () <- chan struct {} {
768+ return fd .synced
769+ }
770+
771+ func (d * lockStepDeployer ) HasSyncedChecker () cache.DoneChecker {
772+ ch := make (chan struct {})
773+ close (ch )
774+ return & fakeSharedIndexInformerDone {synced : ch }
775+ }
776+
759777func (d * lockStepDeployer ) DeployedEncryptionConfigSecret (ctx context.Context ) (secret * corev1.Secret , converged bool , err error ) {
760778 d .lock .Lock ()
761779 defer d .lock .Unlock ()
You can’t perform that action at this time.
0 commit comments