Merge pull request #110811 from Abirdcfly/clock

Update golangci-lint to 1.46.2 and fix errors
This commit is contained in:
Kubernetes Prow Robot
2022-07-06 16:03:32 -07:00
committed by GitHub
7 changed files with 283 additions and 156 deletions

View File

@@ -943,7 +943,7 @@ func TestUpdateNodeStatusWithLease(t *testing.T) {
cond.LastTransitionTime = cond.LastTransitionTime.Rfc3339Copy()
}
// Expect LastHearbeat updated, other things unchanged.
// Expect LastHeartbeat updated, other things unchanged.
for i, cond := range expectedNode.Status.Conditions {
expectedNode.Status.Conditions[i].LastHeartbeatTime = metav1.NewTime(cond.LastHeartbeatTime.Time.Add(time.Minute)).Rfc3339Copy()
}
@@ -1009,7 +1009,6 @@ func TestUpdateNodeStatusWithLease(t *testing.T) {
assert.Len(t, actions, 9)
assert.IsType(t, core.GetActionImpl{}, actions[7])
assert.IsType(t, core.PatchActionImpl{}, actions[8])
patchAction = actions[8].(core.PatchActionImpl)
// Update node status when keeping the pod CIDR.
// Do not report node status if it is within the duration of nodeStatusReportFrequency.