@@ -95,7 +95,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
9595 Message : "deployment/: could not be retrieved" ,
9696 },
9797 }
98- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
98+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
9999 },
100100 },
101101 {
@@ -112,7 +112,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
112112 {
113113 Type : fmt .Sprintf ("%sWorkloadDegraded" , defaultControllerName ),
114114 Status : operatorv1 .ConditionTrue ,
115- Message : "nasty error\n " ,
115+ Message : "nasty error" ,
116116 Reason : "SyncError" ,
117117 },
118118 {
@@ -129,7 +129,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
129129 Message : "deployment/: could not be retrieved" ,
130130 },
131131 }
132- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
132+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
133133 },
134134 },
135135 {
@@ -140,7 +140,6 @@ func TestUpdateOperatorStatus(t *testing.T) {
140140 Namespace : "openshift-apiserver" ,
141141 },
142142 Spec : appsv1.DeploymentSpec {
143- Template : corev1.PodTemplateSpec {ObjectMeta : metav1.ObjectMeta {Labels : map [string ]string {"foo" : "bar" }}},
144143 Replicas : ptr.To [int32 ](3 ),
145144 },
146145 Status : appsv1.DeploymentStatus {
@@ -152,7 +151,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
152151 },
153152 pods : []* corev1.Pod {
154153 {
155- ObjectMeta : metav1.ObjectMeta {Name : "apiserver" , Namespace : "openshift-apiserver" , Labels : map [ string ] string { "foo" : "bar" } },
154+ ObjectMeta : metav1.ObjectMeta {Name : "apiserver" , Namespace : "openshift-apiserver" },
156155 Status : corev1.PodStatus {
157156 Phase : corev1 .PodPending ,
158157 ContainerStatuses : []corev1.ContainerStatus {
@@ -203,7 +202,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
203202 Message : "deployment/apiserver.openshift-apiserver: 0/3 pods have been updated to the latest generation and 0/3 pods are available" ,
204203 },
205204 }
206- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
205+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
207206 },
208207 },
209208 {
@@ -214,7 +213,6 @@ func TestUpdateOperatorStatus(t *testing.T) {
214213 Namespace : "openshift-apiserver" ,
215214 },
216215 Spec : appsv1.DeploymentSpec {
217- Template : corev1.PodTemplateSpec {ObjectMeta : metav1.ObjectMeta {Labels : map [string ]string {"foo" : "bar" }}},
218216 Replicas : ptr.To [int32 ](3 ),
219217 },
220218 Status : appsv1.DeploymentStatus {
@@ -226,7 +224,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
226224 },
227225 pods : []* corev1.Pod {
228226 {
229- ObjectMeta : metav1.ObjectMeta {Name : "apiserver" , Namespace : "openshift-apiserver" , Labels : map [ string ] string { "foo" : "bar" } },
227+ ObjectMeta : metav1.ObjectMeta {Name : "apiserver" , Namespace : "openshift-apiserver" },
230228 Status : corev1.PodStatus {
231229 Phase : corev1 .PodPending ,
232230 ContainerStatuses : []corev1.ContainerStatus {
@@ -276,7 +274,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
276274 Message : "deployment/apiserver.openshift-apiserver: 0/3 pods have been updated to the latest generation and 0/3 pods are available" ,
277275 },
278276 }
279- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
277+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
280278 },
281279 },
282280 {
@@ -287,7 +285,6 @@ func TestUpdateOperatorStatus(t *testing.T) {
287285 Namespace : "openshift-apiserver" ,
288286 },
289287 Spec : appsv1.DeploymentSpec {
290- Template : corev1.PodTemplateSpec {ObjectMeta : metav1.ObjectMeta {Labels : map [string ]string {"foo" : "bar" }}},
291288 Replicas : ptr.To [int32 ](3 ),
292289 },
293290 Status : appsv1.DeploymentStatus {
@@ -343,7 +340,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
343340 Message : "" ,
344341 },
345342 }
346- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
343+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
347344 },
348345 },
349346 {
@@ -389,7 +386,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
389386 Message : "" ,
390387 },
391388 }
392- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
389+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
393390 },
394391 },
395392 {
@@ -439,7 +436,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
439436 Message : "deployment/apiserver.openshift-apiserver: observed generation is 99, desired generation is 100." ,
440437 },
441438 }
442- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
439+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
443440 },
444441 },
445442
@@ -490,7 +487,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
490487 Message : "deployment/apiserver.openshift-apiserver: observed generation is 99, desired generation is 100." ,
491488 },
492489 }
493- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
490+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
494491 },
495492 },
496493 {
@@ -523,7 +520,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
523520 Message : "the operator didn't specify what preconditions are missing" ,
524521 },
525522 }
526- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
523+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
527524 },
528525 },
529526 {
@@ -573,7 +570,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
573570 Message : "deployment/apiserver.openshift-apiserver: 1/3 pods have been updated to the latest generation and 2/3 pods are available" ,
574571 },
575572 }
576- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
573+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
577574 },
578575 },
579576 {
@@ -624,7 +621,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
624621 Reason : "AsExpected" ,
625622 },
626623 }
627- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
624+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
628625 },
629626 },
630627 {
@@ -635,8 +632,6 @@ func TestUpdateOperatorStatus(t *testing.T) {
635632 Namespace : "openshift-apiserver" ,
636633 },
637634 Spec : appsv1.DeploymentSpec {
638- Selector : & metav1.LabelSelector {MatchLabels : map [string ]string {"foo" : "bar" }},
639- Template : corev1.PodTemplateSpec {ObjectMeta : metav1.ObjectMeta {Labels : map [string ]string {"foo" : "bar" }}},
640635 Replicas : ptr.To [int32 ](3 ),
641636 },
642637 Status : appsv1.DeploymentStatus {
@@ -673,7 +668,7 @@ func TestUpdateOperatorStatus(t *testing.T) {
673668 Message : "deployment/apiserver.openshift-apiserver: 3/3 pods have been updated to the latest generation and 2/3 pods are available" ,
674669 },
675670 }
676- return areCondidtionsEqual (expectedConditions , actualStatus .Conditions )
671+ return areConditionsEqual (expectedConditions , actualStatus .Conditions )
677672 },
678673 },
679674 }
@@ -756,7 +751,7 @@ func (f *fakePodLister) Pods(namespace string) corev1listers.PodNamespaceLister
756751 }
757752}
758753
759- func areCondidtionsEqual (expectedConditions []operatorv1.OperatorCondition , actualConditions []operatorv1.OperatorCondition ) error {
754+ func areConditionsEqual (expectedConditions []operatorv1.OperatorCondition , actualConditions []operatorv1.OperatorCondition ) error {
760755 if len (expectedConditions ) != len (actualConditions ) {
761756 return fmt .Errorf ("expected %d conditions but got %d" , len (expectedConditions ), len (actualConditions ))
762757 }
0 commit comments