aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/topology_test.go
blob: 9a0dbc6b804dbc06a7614df7169e6be412ddfd45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package topology

import (
	"testing"
)

func TestRemoveDataCenter(t *testing.T) {
	topo := setup(topologyLayout)
	topo.UnlinkChildNode(NodeId("dc2"))
	if topo.GetActiveVolumeCount() != 15 {
		t.Fail()
	}
	topo.UnlinkChildNode(NodeId("dc3"))
	if topo.GetActiveVolumeCount() != 12 {
		t.Fail()
	}
}