Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
UB-1475: code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Olga Shtivelman committed Aug 19, 2018
1 parent e6b8132 commit 015b4af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions remote/mounter/block_device_utils/block_device_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions remote/mounter/block_device_utils/mpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
Expand Down

0 comments on commit 015b4af

Please sign in to comment.