@@ -538,7 +538,7 @@ func TestRevisionController(t *testing.T) {
538538 tc .testConfigs ,
539539 tc .testSecrets ,
540540 informers .NewSharedInformerFactoryWithOptions (kubeClient , 1 * time .Minute , informers .WithNamespace (tc .targetNamespace )),
541- StaticPodLatestRevisionClient { StaticPodOperatorClient : tc .staticPodOperatorClient } ,
541+ tc .staticPodOperatorClient ,
542542 kubeClient .CoreV1 (),
543543 kubeClient .CoreV1 (),
544544 eventRecorder ,
@@ -566,25 +566,6 @@ func TestRevisionController(t *testing.T) {
566566 }
567567}
568568
569- type fakeStaticPodLatestRevisionClient struct {
570- v1helpers.StaticPodOperatorClient
571- client * StaticPodLatestRevisionClient
572- updateLatestRevisionOperatorStatusErrs bool
573- }
574-
575- var _ LatestRevisionClient = & fakeStaticPodLatestRevisionClient {}
576-
577- func (c fakeStaticPodLatestRevisionClient ) GetLatestRevisionState () (* operatorv1.OperatorSpec , * operatorv1.OperatorStatus , int32 , string , error ) {
578- return c .client .GetLatestRevisionState ()
579- }
580-
581- func (c fakeStaticPodLatestRevisionClient ) UpdateLatestRevisionOperatorStatus (ctx context.Context , latestAvailableRevision int32 , updateFuncs ... v1helpers.UpdateStatusFunc ) (* operatorv1.OperatorStatus , bool , error ) {
582- if c .updateLatestRevisionOperatorStatusErrs {
583- return nil , false , fmt .Errorf ("Operation cannot be fulfilled on kubeapiservers.operator.openshift.io \" cluster\" : the object has been modified; please apply your changes to the latest version and try again" )
584- }
585- return c .client .UpdateLatestRevisionOperatorStatus (ctx , latestAvailableRevision , updateFuncs ... )
586- }
587-
588569func TestRevisionControllerRevisionCreatedFailedStatusUpdate (t * testing.T ) {
589570 startingObjects := []runtime.Object {
590571 & v1.Secret {ObjectMeta : metav1.ObjectMeta {Name : "test-secret" , Namespace : targetNamespace }},
@@ -832,7 +813,7 @@ func TestSyncWithRevisionPrecondition(t *testing.T) {
832813 tc .testConfigs ,
833814 tc .testSecrets ,
834815 informers .NewSharedInformerFactoryWithOptions (kubeClient , 1 * time .Minute , informers .WithNamespace (targetNamespace )),
835- StaticPodLatestRevisionClient { StaticPodOperatorClient : tc .staticPodOperatorClient } ,
816+ tc .staticPodOperatorClient ,
836817 kubeClient .CoreV1 (),
837818 kubeClient .CoreV1 (),
838819 eventRecorder ,
0 commit comments