Move Node.ExternalID to CloudNodes()

This commit is contained in:
Deyuan Deng
2015-03-03 19:20:25 -05:00
parent a0bfb62bae
commit 53e17f0fa5
2 changed files with 28 additions and 23 deletions

View File

@@ -247,7 +247,7 @@ func TestRegisterNodes(t *testing.T) {
}
}
func TestCreateStaticNodes(t *testing.T) {
func TestCreateGetStaticNodesWithSpec(t *testing.T) {
table := []struct {
machines []string
expectedNodes *api.NodeList
@@ -289,7 +289,7 @@ func TestCreateStaticNodes(t *testing.T) {
for _, item := range table {
nodeController := NewNodeController(nil, "", item.machines, &api.NodeResources{}, nil, nil, 10, time.Minute)
nodes, err := nodeController.StaticNodes()
nodes, err := nodeController.GetStaticNodesWithSpec()
if err != nil {
t.Errorf("unexpected error: %v", err)
}
@@ -299,7 +299,7 @@ func TestCreateStaticNodes(t *testing.T) {
}
}
func TestCreateCloudNodes(t *testing.T) {
func TestCreateGetCloudNodesWithSpec(t *testing.T) {
resourceList := api.ResourceList{
api.ResourceCPU: *resource.NewMilliQuantity(1000, resource.DecimalSI),
api.ResourceMemory: *resource.NewQuantity(3000, resource.DecimalSI),
@@ -350,7 +350,7 @@ func TestCreateCloudNodes(t *testing.T) {
for _, item := range table {
nodeController := NewNodeController(item.fakeCloud, ".*", nil, &api.NodeResources{}, nil, nil, 10, time.Minute)
nodes, err := nodeController.CloudNodes()
nodes, err := nodeController.GetCloudNodesWithSpec()
if err != nil {
t.Errorf("unexpected error: %v", err)
}