Update golangci-lint to 1.46.2 and fix errors

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
This commit is contained in:
Abirdcfly
2022-06-27 22:17:42 +08:00
parent 42fec42586
commit 2bca77a3d9
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.