Fix test failure in sync_test.go.

This commit is contained in:
Jing Ai 2017-11-21 09:59:48 -08:00
parent 996ddde3fa
commit 302c59f50f

View File

@ -145,11 +145,10 @@ func TestNodeSyncUpdate(t *testing.T) {
events: []fakeEvent{{"node1", "CloudCIDRAllocatorMismatch"}}, events: []fakeEvent{{"node1", "CloudCIDRAllocatorMismatch"}},
}, },
{ {
desc: "update alias from node", desc: "update alias from node",
mode: SyncFromCloud, mode: SyncFromCloud,
node: nodeWithCIDRRange, node: nodeWithCIDRRange,
events: []fakeEvent{{"node1", "CloudCIDRAllocatorInvalidMode"}}, events: nil,
wantError: true,
}, },
{ {
desc: "update alias from node", desc: "update alias from node",
@ -165,12 +164,11 @@ func TestNodeSyncUpdate(t *testing.T) {
// XXX/bowei -- validation // XXX/bowei -- validation
}, },
{ {
desc: "update node from alias", desc: "update node from alias",
mode: SyncFromCluster, mode: SyncFromCluster,
node: nodeWithoutCIDRRange, node: nodeWithoutCIDRRange,
fake: fakeAPIs{aliasRange: test.MustParseCIDR("10.1.2.3/16")}, fake: fakeAPIs{aliasRange: test.MustParseCIDR("10.1.2.3/16")},
events: []fakeEvent{{"node1", "CloudCIDRAllocatorInvalidMode"}}, events: nil,
wantError: true,
}, },
{ {
desc: "allocate range", desc: "allocate range",