@@ -210,8 +210,7 @@ func TestHealthCheckTargets(t *testing.T) {
210
210
211
211
timeoutForMachineToHaveNode := 10 * time .Minute
212
212
disabledTimeoutForMachineToHaveNode := time .Duration (0 )
213
-
214
- twoDaysFromNow := time .Now ().Add (time .Hour * 24 * 2 )
213
+ timeoutForUnhealthyConditions := 5 * time .Minute
215
214
216
215
// Create a test MHC
217
216
testMHC := & clusterv1.MachineHealthCheck {
@@ -241,9 +240,6 @@ func TestHealthCheckTargets(t *testing.T) {
241
240
242
241
testMachine := newTestMachine ("machine1" , namespace , clusterName , "node1" , mhcSelector )
243
242
244
- testMachineWithExpiringCertificate := testMachine .DeepCopy ()
245
- testMachineWithExpiringCertificate .Status .CertificatesExpiryDate = & metav1.Time {Time : twoDaysFromNow }
246
-
247
243
// Targets for when the node has not yet been seen by the Machine controller
248
244
testMachineCreated1200s := testMachine .DeepCopy ()
249
245
nowMinus1200s := metav1 .NewTime (time .Now ().Add (- 1200 * time .Second ))
@@ -344,14 +340,6 @@ func TestHealthCheckTargets(t *testing.T) {
344
340
}
345
341
machineFailureMsgCondition := newFailedHealthCheckCondition (clusterv1 .MachineHasFailureReason , "FailureMessage: %s" , failureMsg )
346
342
347
- machineCertExpiringTarget := healthCheckTarget {
348
- Cluster : cluster ,
349
- MHC : testMHC ,
350
- Machine : testMachineWithExpiringCertificate ,
351
- Node : testNodeHealthy ,
352
- nodeMissing : false ,
353
- }
354
-
355
343
testCases := []struct {
356
344
desc string
357
345
targets []healthCheckTarget
@@ -438,13 +426,6 @@ func TestHealthCheckTargets(t *testing.T) {
438
426
expectedNeedsRemediationCondition : []clusterv1.Condition {machineFailureMsgCondition },
439
427
expectedNextCheckTimes : []time.Duration {},
440
428
},
441
- {
442
- desc : "when a machines certificates are not valid for longer than the minimum expiry duration" ,
443
- targets : []healthCheckTarget {machineCertExpiringTarget },
444
- expectedHealthy : []healthCheckTarget {},
445
- expectedNeedsRemediation : []healthCheckTarget {machineCertExpiringTarget },
446
- expectedNextCheckTimes : []time.Duration {},
447
- },
448
429
}
449
430
450
431
for _ , tc := range testCases {
0 commit comments