seaweedfs/weed/topology/topo_test.go

18 lines
298 B
Go
Raw Normal View History

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