@@ -217,65 +217,6 @@ func (f fakeRiFlags) CVOConfiguration() bool {
217217 return f .cvoConfiguration
218218}
219219
220- // TODO: Can be removed in 4.21
221- func TestUpdateClusterVersionStatus_AlwaysRemove_ReconciliationIssues (t * testing.T ) {
222- testCases := []struct {
223- name string
224-
225- unknownVersion bool
226- oldCondition * configv1.ClusterOperatorStatusCondition
227- failure error
228- }{
229- {
230- name : "version known, no failure => condition not present" ,
231- unknownVersion : false ,
232- },
233- {
234- name : "version known, failure => condition not present" ,
235- unknownVersion : false ,
236- failure : fmt .Errorf ("something happened" ),
237- },
238- {
239- name : "version unknown, failure, existing condition => condition present" ,
240- oldCondition : & configv1.ClusterOperatorStatusCondition {
241- Type : reconciliationIssuesConditionType ,
242- Status : configv1 .ConditionFalse ,
243- Reason : "noReconciliationIssuesReason" ,
244- Message : "Happy condition is happy" ,
245- },
246- unknownVersion : true ,
247- failure : fmt .Errorf ("something happened" ),
248- },
249- {
250- name : "version unknown, failure, no existing condition => condition not present" ,
251- unknownVersion : true ,
252- failure : fmt .Errorf ("something happened" ),
253- },
254- }
255- for _ , tc := range testCases {
256- tc := tc
257- t .Run (tc .name , func (t * testing.T ) {
258- gates := fakeRiFlags {
259- unknownVersion : tc .unknownVersion ,
260- }
261- release := configv1.Release {}
262- getAvailableUpdates := func () * availableUpdates { return nil }
263- var noErrors field.ErrorList
264- cvStatus := configv1.ClusterVersionStatus {}
265- if tc .oldCondition != nil {
266- cvStatus .Conditions = append (cvStatus .Conditions , * tc .oldCondition )
267- }
268- updateClusterVersionStatus (& cvStatus , & SyncWorkerStatus {Failure : tc .failure }, release , getAvailableUpdates , gates , noErrors )
269- condition := resourcemerge .FindOperatorStatusCondition (cvStatus .Conditions , reconciliationIssuesConditionType )
270- if condition != nil {
271- t .Errorf ("expected condition %s to not be present, but it was: %v" , reconciliationIssuesConditionType , condition )
272- }
273- })
274-
275- }
276-
277- }
278-
279220func TestUpdateClusterVersionStatus_FilteringMultipleErrorsForFailingCondition (t * testing.T ) {
280221 ignoreLastTransitionTime := cmpopts .IgnoreFields (configv1.ClusterOperatorStatusCondition {}, "LastTransitionTime" )
281222 type args struct {
0 commit comments