topo_test.go 298 B

1234567891011121314151617
  1. package topology
  2. import (
  3. "testing"
  4. )
  5. func TestRemoveDataCenter(t *testing.T) {
  6. topo := setup(topologyLayout)
  7. topo.UnlinkChildNode(NodeId("dc2"))
  8. if topo.GetActiveVolumeCount() != 15 {
  9. t.Fail()
  10. }
  11. topo.UnlinkChildNode(NodeId("dc3"))
  12. if topo.GetActiveVolumeCount() != 12 {
  13. t.Fail()
  14. }
  15. }