adjusting testing

This commit is contained in:
Chris Lu 2012-09-21 01:31:52 -07:00
parent d056c622bf
commit e986dcf5e0
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ import (
)
func TestXYZ(t *testing.T) {
topo := NewTopology("topo")
topo := NewTopology("topo","/tmp","test",234,5)
for i := 0; i < 5; i++ {
dc := NewDataCenter("dc" + strconv.Itoa(i))
dc.activeVolumeCount = i

View file

@ -80,7 +80,7 @@ func setup(topologyLayout string) *Topology {
//printMap(data)
//need to connect all nodes first before server adding volumes
topo := NewTopology("mynetwork")
topo := NewTopology("mynetwork","/tmp","test",234,5)
mTopology := data.(map[string]interface{})
for dcKey, dcValue := range mTopology {
dc := NewDataCenter(dcKey)
@ -96,8 +96,8 @@ func setup(topologyLayout string) *Topology {
rack.LinkChildNode(server)
for _, v := range serverMap["volumes"].([]interface{}) {
m := v.(map[string]interface{})
vi := &storage.VolumeInfo{Id: storage.VolumeId(int64(m["id"].(float64))), Size: int64(m["size"].(float64))}
server.AddVolume(vi)
vi := storage.VolumeInfo{Id: storage.VolumeId(int64(m["id"].(float64))), Size: int64(m["size"].(float64))}
server.AddOrUpdateVolume(vi)
}
server.UpAdjustMaxVolumeCountDelta(int(serverMap["limit"].(float64)))
}