File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -485,6 +485,9 @@ func conditionalUpdateRisks(conditionalUpdates []configv1.ConditionalUpdate) []c
485485 result = append (result , risk )
486486 }
487487 }
488+ sort .Slice (result , func (i , j int ) bool {
489+ return result [i ].Name < result [j ].Name
490+ })
488491 return result
489492}
490493
Original file line number Diff line number Diff line change @@ -1125,15 +1125,15 @@ func Test_conditionalUpdateRisks(t *testing.T) {
11251125 Type : "Applies" ,
11261126 Status : metav1 .ConditionTrue ,
11271127 },
1128- }}, {Name : "Risk3 " ,
1128+ }}, {Name : "Risk2 " ,
11291129 Conditions : []metav1.Condition {{
11301130 Type : "Applies" ,
1131- Status : metav1 .ConditionTrue ,
1131+ Status : metav1 .ConditionFalse ,
11321132 },
1133- }}, {Name : "Risk2 " ,
1133+ }}, {Name : "Risk3 " ,
11341134 Conditions : []metav1.Condition {{
11351135 Type : "Applies" ,
1136- Status : metav1 .ConditionFalse ,
1136+ Status : metav1 .ConditionTrue ,
11371137 },
11381138 }}},
11391139 },
You can’t perform that action at this time.
0 commit comments