diff --git a/remote/mounter/block_device_utils/block_device_utils_test.go b/remote/mounter/block_device_utils/block_device_utils_test.go index ec687066..a6224963 100644 --- a/remote/mounter/block_device_utils/block_device_utils_test.go +++ b/remote/mounter/block_device_utils/block_device_utils_test.go @@ -203,8 +203,7 @@ var _ = Describe("block_device_utils_test", func() { -+- policy='service-time 0' prio=1 status=active |- 33:0:0:1 sdb 8:16 active ready running - 34:0:0:1 sdc 8:32 active ready running` - fakeExec.ExecuteReturnsOnCall(0, []byte(mpathOutput), - nil) + fakeExec.ExecuteReturnsOnCall(0, []byte(mpathOutput), nil) returnError := &exec.ExitError{} //this execute with timeout makes the GetWwnByScsiInq to return an error fakeExec.ExecuteWithTimeoutReturns([]byte(""),returnError) diff --git a/remote/mounter/block_device_utils/mpath.go b/remote/mounter/block_device_utils/mpath.go index b8844ea7..0394cd31 100644 --- a/remote/mounter/block_device_utils/mpath.go +++ b/remote/mounter/block_device_utils/mpath.go @@ -124,7 +124,6 @@ func (b *blockDeviceUtils) DiscoverBySgInq(mpathOutput string, volumeWwn string) return "", b.logger.ErrorRet(err, "failed") } dev := "" - for scanner.Scan() { line := scanner.Text() b.logger.Debug(fmt.Sprintf("%s", line)) @@ -134,7 +133,7 @@ func (b *blockDeviceUtils) DiscoverBySgInq(mpathOutput string, volumeWwn string) mpathFullPath := b.mpathDevFullPath(dev) wwn, err := b.GetWwnByScsiInq(mpathFullPath) if err != nil { - return "", b.logger.ErrorRet(err, "failed") + return "", b.logger.ErrorRet(err, "failed") } if strings.ToLower(wwn) == strings.ToLower(volumeWwn) { return dev, nil