2021-03-15 04:29:55 +00:00
|
|
|
package shell
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestVolumeServerEvacuate(t *testing.T) {
|
2023-03-13 17:00:27 +00:00
|
|
|
targetServer := ""
|
|
|
|
volumeRack := "rack1"
|
|
|
|
c := commandVolumeServerEvacuate{
|
|
|
|
targetServer: &targetServer,
|
|
|
|
volumeRack: &volumeRack,
|
|
|
|
}
|
2022-07-12 09:56:34 +00:00
|
|
|
c.topologyInfo = parseOutput(topoData)
|
2021-03-15 04:29:55 +00:00
|
|
|
|
|
|
|
volumeServer := "192.168.1.4:8080"
|
2022-07-12 09:56:34 +00:00
|
|
|
if err := c.evacuateNormalVolumes(nil, volumeServer, true, false, os.Stdout); err != nil {
|
2021-03-15 04:29:55 +00:00
|
|
|
t.Errorf("evacuate: %v", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|