Fix the unit test patch to not modify the node name

This commit is contained in:
Chao Xu 2018-12-19 14:02:33 -08:00
parent ac6fa2235b
commit 7223f0fd16

View File

@ -69,7 +69,9 @@ func TestPatchNodeNonErrorCases(t *testing.T) {
t.Fatalf("failed to create node to fake client: %v", err) t.Fatalf("failed to create node to fake client: %v", err)
} }
conditionFunction := apiclient.PatchNodeOnce(client, tc.lookupName, func(node *v1.Node) { conditionFunction := apiclient.PatchNodeOnce(client, tc.lookupName, func(node *v1.Node) {
node.Name = "testNewNode" node.Annotations = map[string]string{
"updatedBy": "test",
}
}) })
success, err := conditionFunction() success, err := conditionFunction()
if err != nil { if err != nil {