Remove validation for Capacity as it got moved from Spec to Status.

Also fix breakage from ExternalID validation: Default ExternalID to node name when not specified.
This commit is contained in:
Rohit Jnagal
2015-04-01 23:11:33 +00:00
parent 668e8655c6
commit e0ff139279
14 changed files with 72 additions and 95 deletions

View File

@@ -187,3 +187,14 @@ func TestSetDefaultServicePort(t *testing.T) {
t.Errorf("Expected port %d, got %v", in.Ports[0].Port, out.Ports[0].ContainerPort)
}
}
func TestSetDefaultMinionExternalID(t *testing.T) {
name := "node0"
m := &current.Minion{}
m.ID = name
obj2 := roundTrip(t, runtime.Object(m))
m2 := obj2.(*current.Minion)
if m2.ExternalID != name {
t.Errorf("Expected default External ID: %s, got: %s", name, m2.ExternalID)
}
}