seaweedfs/weed/topology/topo_test.go

18 lines
298 B
Go
Raw Normal View History

2012-08-29 16:42:24 +08:00
package topology
import (
2012-08-31 16:35:11 +08:00
"testing"
2012-08-29 16:42:24 +08:00
)
func TestRemoveDataCenter(t *testing.T) {
topo := setup(topologyLayout)
topo.UnlinkChildNode(NodeId("dc2"))
if topo.GetActiveVolumeCount() != 15 {
2012-09-01 17:20:59 +08:00
t.Fail()
}
topo.UnlinkChildNode(NodeId("dc3"))
if topo.GetActiveVolumeCount() != 12 {
2012-09-01 17:20:59 +08:00
t.Fail()
}
}