From 420cf7bbfd7582108c8b96663c970aa4e830ac3d Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Tue, 20 Oct 2020 21:16:16 +0300 Subject: [PATCH] Fix tests --- conn_test.go | 2 +- walker_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conn_test.go b/conn_test.go index 4b9d7a5..531b74a 100644 --- a/conn_test.go +++ b/conn_test.go @@ -328,7 +328,7 @@ func openConn(t *testing.T, addr string, options ...DialOption) (*ftpMock, *Serv // Helper to close a client connected to a mock server func closeConn(t *testing.T, mock *ftpMock, c *ServerConn, commands []string) { - expected := []string{"FEAT", "USER", "PASS", "TYPE", "OPTS"} + expected := []string{"USER", "PASS", "FEAT", "TYPE", "OPTS"} expected = append(expected, commands...) expected = append(expected, "QUIT") diff --git a/walker_test.go b/walker_test.go index 2ee0bcb..232c54b 100644 --- a/walker_test.go +++ b/walker_test.go @@ -104,11 +104,11 @@ func TestEmptyStackReturnsFalse(t *testing.T) { assert, require := assert.New(t), require.New(t) mock, err := newFtpMock(t, "127.0.0.1") - require.NotNil(err) + require.Nil(err) defer mock.Close() c, cErr := Connect(mock.Addr()) - require.NotNil(cErr) + require.Nil(cErr) w := c.Walk("/root") @@ -136,11 +136,11 @@ func TestCurAndStackSetCorrectly(t *testing.T) { assert, require := assert.New(t), require.New(t) mock, err := newFtpMock(t, "127.0.0.1") - require.NotNil(err) + require.Nil(err) defer mock.Close() c, cErr := Connect(mock.Addr()) - require.NotNil(cErr) + require.Nil(cErr) w := c.Walk("/root") w.cur = &item{