@@ -1098,7 +1098,6 @@ func Test_conditionalUpdateRisks(t *testing.T) {
10981098 tests := []struct {
10991099 name string
11001100 conditionalUpdates []configv1.ConditionalUpdate
1101- alertRisks []configv1.ConditionalUpdateRisk
11021101 expected []configv1.ConditionalUpdateRisk
11031102 }{
11041103 {
@@ -1132,28 +1131,6 @@ func Test_conditionalUpdateRisks(t *testing.T) {
11321131 },
11331132 }}},
11341133 }},
1135- alertRisks : []configv1.ConditionalUpdateRisk {
1136- {
1137- Name : "PodDisruptionBudgetAtLimit" ,
1138- Message : "summary." ,
1139- URL : "todo-url" ,
1140- MatchingRules : []configv1.ClusterCondition {
1141- {
1142- Type : "PromQL" ,
1143- PromQL : & configv1.PromQLClusterCondition {
1144- PromQL : "todo-expression" ,
1145- },
1146- },
1147- },
1148- Conditions : []metav1.Condition {{
1149- Type : "Applies" ,
1150- Status : "True" ,
1151- Reason : "Alert:firing" ,
1152- Message : "severity alert PodDisruptionBudgetAtLimit firing, which might slow node drains. Namespace=namespace, PodDisruptionBudget=some-pdb. summary. The alert description is: description | message http://runbook.example.com/runbooks/bbb.md; severity alert PodDisruptionBudgetAtLimit firing, which might slow node drains. Namespace=namespace, PodDisruptionBudget=another-pdb. summary. The alert description is: description | message http://runbook.example.com/runbooks/bbb.md" ,
1153- LastTransitionTime : metav1 .NewTime (t1 ),
1154- }},
1155- },
1156- },
11571134 expected : []configv1.ConditionalUpdateRisk {
11581135 {
11591136 Name : "PodDisruptionBudgetAtLimit" ,
@@ -1195,7 +1172,7 @@ func Test_conditionalUpdateRisks(t *testing.T) {
11951172 }
11961173 for _ , tt := range tests {
11971174 t .Run (tt .name , func (t * testing.T ) {
1198- actual := conditionalUpdateRisks (tt .conditionalUpdates , tt . alertRisks )
1175+ actual := conditionalUpdateRisks (tt .conditionalUpdates )
11991176 if difference := cmp .Diff (tt .expected , actual , cmpopts .IgnoreFields (metav1.Condition {}, "LastTransitionTime" )); difference != "" {
12001177 t .Errorf ("actual differ from expected:\n %s" , difference )
12011178 }
0 commit comments