command_volume_server_evacuate_test.go 438 B

12345678910111213141516171819202122
  1. package shell
  2. import (
  3. "os"
  4. "testing"
  5. )
  6. func TestVolumeServerEvacuate(t *testing.T) {
  7. targetServer := ""
  8. volumeRack := "rack1"
  9. c := commandVolumeServerEvacuate{
  10. targetServer: &targetServer,
  11. volumeRack: &volumeRack,
  12. }
  13. c.topologyInfo = parseOutput(topoData)
  14. volumeServer := "192.168.1.4:8080"
  15. if err := c.evacuateNormalVolumes(nil, volumeServer, true, false, os.Stdout); err != nil {
  16. t.Errorf("evacuate: %v", err)
  17. }
  18. }