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() } }