Node addresses

This commit is contained in:
Deyuan Deng
2015-02-13 14:07:23 -05:00
parent 0059c39211
commit 9b0af8df63
14 changed files with 189 additions and 51 deletions

View File

@@ -1919,7 +1919,9 @@ func TestValidateMinion(t *testing.T) {
Labels: validSelector,
},
Status: api.NodeStatus{
HostIP: "something",
Addresses: []api.NodeAddress{
{Type: api.NodeLegacyHostIP, Address: "something"},
},
},
},
{
@@ -1927,7 +1929,9 @@ func TestValidateMinion(t *testing.T) {
Name: "abc",
},
Status: api.NodeStatus{
HostIP: "something",
Addresses: []api.NodeAddress{
{Type: api.NodeLegacyHostIP, Address: "something"},
},
},
},
}
@@ -1944,7 +1948,7 @@ func TestValidateMinion(t *testing.T) {
Labels: validSelector,
},
Status: api.NodeStatus{
HostIP: "something",
Addresses: []api.NodeAddress{},
},
},
"invalid-labels": {
@@ -2073,7 +2077,9 @@ func TestValidateMinionUpdate(t *testing.T) {
Labels: map[string]string{"bar": "foo"},
},
Status: api.NodeStatus{
HostIP: "1.2.3.4",
Addresses: []api.NodeAddress{
{Type: api.NodeLegacyHostIP, Address: "1.2.3.4"},
},
},
}, api.Node{
ObjectMeta: api.ObjectMeta{