Merge pull request #106327 from ravisantoshgudimetla/fix-kubelet-units

[test][kubelet]: Fix out of bounds in TestSyncLabels unit
This commit is contained in:
Kubernetes Prow Robot 2021-11-10 16:03:50 -08:00 committed by GitHub
commit e7c3138d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2408,14 +2408,15 @@ func TestSyncLabels(t *testing.T) {
t.Logf("No action yet") t.Logf("No action yet")
return false, nil return false, nil
} }
action := actions[1] for _, action := range actions {
if action.GetVerb() == "patch" { if action.GetVerb() == "patch" {
patchAction := action.(core.PatchActionImpl) patchAction := action.(core.PatchActionImpl)
var err error var err error
savedNode, err = applyNodeStatusPatch(test.existingNode, patchAction.GetPatch()) savedNode, err = applyNodeStatusPatch(test.existingNode, patchAction.GetPatch())
if err != nil { if err != nil {
t.Logf("node patching failed, %v", err) t.Logf("node patching failed, %v", err)
return false, nil return false, nil
}
} }
} }
} else { } else {