diff --git a/client_test.go b/client_test.go index ea0fa81..3f5cf23 100644 --- a/client_test.go +++ b/client_test.go @@ -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") } } diff --git a/conn_test.go b/conn_test.go index 531b74a..8e571e3 100644 --- a/conn_test.go +++ b/conn_test.go @@ -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") diff --git a/walker_test.go b/walker_test.go index 232c54b..210d2a6 100644 --- a/walker_test.go +++ b/walker_test.go @@ -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")