|
@@ -11,15 +11,15 @@ func TestCreateRAIDDevice(t *testing.T) {
|
|
//Create an empty Manager
|
|
//Create an empty Manager
|
|
manager, _ := raid.NewRaidManager(raid.Options{})
|
|
manager, _ := raid.NewRaidManager(raid.Options{})
|
|
|
|
|
|
- // Make sure the loop0 and loop1 devies are mounted with automount.sh
|
|
|
|
|
|
+ // Make sure the sdb and sdc exists when running test case in VM
|
|
devName, _ := raid.GetNextAvailableMDDevice()
|
|
devName, _ := raid.GetNextAvailableMDDevice()
|
|
raidLevel := 1
|
|
raidLevel := 1
|
|
- raidDeviceIds := []string{"/dev/loop0", "/dev/loop1"}
|
|
|
|
|
|
+ raidDeviceIds := []string{"/dev/sdb", "/dev/sdc"}
|
|
spareDeviceIds := []string{}
|
|
spareDeviceIds := []string{}
|
|
|
|
|
|
//Format the drives
|
|
//Format the drives
|
|
for _, partion := range raidDeviceIds {
|
|
for _, partion := range raidDeviceIds {
|
|
- fmt.Printf("Wiping partition: " + partion)
|
|
|
|
|
|
+ fmt.Println("Wiping partition: " + partion)
|
|
err := manager.WipeDisk(partion)
|
|
err := manager.WipeDisk(partion)
|
|
if err != nil {
|
|
if err != nil {
|
|
t.Errorf("Disk wipe error: %v", err)
|
|
t.Errorf("Disk wipe error: %v", err)
|