Skip to content

Commit 8744a80

Browse files
committed
cleanup: fix golint
1 parent 5d16a08 commit 8744a80

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

iscsi/iscsi_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,8 @@ func TestConnectorPersistance(t *testing.T) {
723723
return makeFakeExecCommand(0, string(mockedOutput))(cmd, args...)
724724
}).Reset()
725725

726-
c.Persist("/tmp/connector.json")
726+
err := c.Persist("/tmp/connector.json")
727+
assert.Nil(err)
727728
c2, err := GetConnectorFromFile("/tmp/connector.json")
728729
assert.Nil(err)
729730
assert.NotNil(c2)

iscsi/iscsiadm.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,21 @@ func Login(tgtIQN, portal string) error {
168168
func Logout(tgtIQN, portal string) error {
169169
debug.Println("Begin Logout...")
170170
args := []string{"-m", "node", "-T", tgtIQN, "-p", portal, "-u"}
171-
iscsiCmd(args...)
172-
return nil
171+
_, err := iscsiCmd(args...)
172+
return err
173173
}
174174

175175
// DeleteDBEntry deletes the iscsi db entry for the specified target
176176
func DeleteDBEntry(tgtIQN string) error {
177177
debug.Println("Begin DeleteDBEntry...")
178178
args := []string{"-m", "node", "-T", tgtIQN, "-o", "delete"}
179-
iscsiCmd(args...)
180-
return nil
179+
_, err := iscsiCmd(args...)
180+
return err
181181
}
182182

183183
// DeleteIFace delete the iface
184184
func DeleteIFace(iface string) error {
185185
debug.Println("Begin DeleteIFace...")
186-
iscsiCmd([]string{"-m", "iface", "-I", iface, "-o", "delete"}...)
187-
return nil
186+
_, err := iscsiCmd([]string{"-m", "iface", "-I", iface, "-o", "delete"}...)
187+
return err
188188
}

0 commit comments

Comments
 (0)