AddOrUpdateTaint should ignore duplicate Taint.

The parameter of AddOrUpdateTaint is Taint pointer, so should use
Taint object itself to compare with the node's taint list to ignore
duplicate taint.
This commit is contained in:
Xing Zhou
2017-07-27 16:31:26 +08:00
parent a881405bd4
commit fff9940a3d
4 changed files with 40 additions and 2 deletions

View File

@@ -753,7 +753,7 @@ func TestAddOrUpdateTaintOnNode(t *testing.T) {
{Key: "key1", Value: "value1", Effect: "NoSchedule"},
{Key: "key2", Value: "value2", Effect: "NoExecute"},
},
requestCount: 3,
requestCount: 2,
},
{
name: "add taint to node without taints",