Clear node status before the validation check.

This commit is contained in:
Brendan Burns
2014-12-22 11:04:57 -08:00
parent 95d4da98bb
commit 9884142061
2 changed files with 16 additions and 0 deletions

View File

@@ -1236,6 +1236,20 @@ func TestValidateMinionUpdate(t *testing.T) {
HostIP: "1.2.3.4",
},
}, false},
{api.Node{
ObjectMeta: api.ObjectMeta{
Name: "foo",
Labels: map[string]string{"bar": "foo"},
},
Status: api.NodeStatus{
HostIP: "1.2.3.4",
},
}, api.Node{
ObjectMeta: api.ObjectMeta{
Name: "foo",
Labels: map[string]string{"bar": "fooobaz"},
},
}, true},
}
for _, test := range tests {
errs := ValidateMinionUpdate(&test.oldMinion, &test.minion)