Let CloudProvider return list of NodeAddress, not just one net.IP

This lets cloud providers populate the NodeAddress array
This commit is contained in:
Justin Santa Barbara
2015-03-11 16:37:11 -07:00
parent 7d53425bbc
commit bc16d83a51
14 changed files with 54 additions and 46 deletions

View File

@@ -628,7 +628,7 @@ func TestPopulateNodeAddresses(t *testing.T) {
}{
{
nodes: &api.NodeList{Items: []api.Node{*newNode("node0"), *newNode("node1")}},
fakeCloud: &fake_cloud.FakeCloud{IP: net.ParseIP("1.2.3.4")},
fakeCloud: &fake_cloud.FakeCloud{Addresses: []api.NodeAddress{{Type: api.NodeLegacyHostIP, Address: "1.2.3.4"}}},
expectedAddresses: []api.NodeAddress{
{Type: api.NodeLegacyHostIP, Address: "1.2.3.4"},
},
@@ -1024,7 +1024,7 @@ func TestSyncNodeStatus(t *testing.T) {
Err: nil,
},
fakeCloud: &fake_cloud.FakeCloud{
IP: net.ParseIP("1.2.3.4"),
Addresses: []api.NodeAddress{{Type: api.NodeLegacyHostIP, Address: "1.2.3.4"}},
},
expectedNodes: []*api.Node{
{