mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
[test][kubelet]: Fix out of bounds in TestSyncLabels unit
This commit is contained in:
parent
6b41d75794
commit
696abecada
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user