Fix issues reported by staticcheck
This commit is contained in:
parent
333201f85f
commit
0de5c29d45
@ -228,10 +228,9 @@ func TestTimeout(t *testing.T) {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
c, err := DialTimeout("localhost:2121", 1*time.Second)
|
||||
if err == nil {
|
||||
t.Fatal("expected timeout, got nil error")
|
||||
if c, err := DialTimeout("localhost:2121", 1*time.Second); err == nil {
|
||||
c.Quit()
|
||||
t.Fatal("expected timeout, got nil error")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,6 @@ func (mock *ftpMock) listen(t *testing.T) {
|
||||
}
|
||||
if (strings.Join(cmdParts[1:], " ")) == "UTF8 ON" {
|
||||
mock.proto.Writer.PrintfLine("200 OK, UTF-8 enabled")
|
||||
break
|
||||
}
|
||||
case "REIN":
|
||||
mock.proto.Writer.PrintfLine("220 Logged out")
|
||||
|
@ -178,6 +178,8 @@ func TestCurAndStackSetCorrectly(t *testing.T) {
|
||||
}
|
||||
|
||||
result := w.Next()
|
||||
assert.Equal(true, result, "Result should return true")
|
||||
|
||||
result = w.Next()
|
||||
|
||||
assert.Equal(true, result, "Result should return true")
|
||||
|
Loading…
Reference in New Issue
Block a user