commit
333201f85f
@ -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
|
// Helper to close a client connected to a mock server
|
||||||
func closeConn(t *testing.T, mock *ftpMock, c *ServerConn, commands []string) {
|
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, commands...)
|
||||||
expected = append(expected, "QUIT")
|
expected = append(expected, "QUIT")
|
||||||
|
|
||||||
|
@ -104,11 +104,11 @@ func TestEmptyStackReturnsFalse(t *testing.T) {
|
|||||||
assert, require := assert.New(t), require.New(t)
|
assert, require := assert.New(t), require.New(t)
|
||||||
|
|
||||||
mock, err := newFtpMock(t, "127.0.0.1")
|
mock, err := newFtpMock(t, "127.0.0.1")
|
||||||
require.NotNil(err)
|
require.Nil(err)
|
||||||
defer mock.Close()
|
defer mock.Close()
|
||||||
|
|
||||||
c, cErr := Connect(mock.Addr())
|
c, cErr := Connect(mock.Addr())
|
||||||
require.NotNil(cErr)
|
require.Nil(cErr)
|
||||||
|
|
||||||
w := c.Walk("/root")
|
w := c.Walk("/root")
|
||||||
|
|
||||||
@ -136,11 +136,11 @@ func TestCurAndStackSetCorrectly(t *testing.T) {
|
|||||||
assert, require := assert.New(t), require.New(t)
|
assert, require := assert.New(t), require.New(t)
|
||||||
|
|
||||||
mock, err := newFtpMock(t, "127.0.0.1")
|
mock, err := newFtpMock(t, "127.0.0.1")
|
||||||
require.NotNil(err)
|
require.Nil(err)
|
||||||
defer mock.Close()
|
defer mock.Close()
|
||||||
|
|
||||||
c, cErr := Connect(mock.Addr())
|
c, cErr := Connect(mock.Addr())
|
||||||
require.NotNil(cErr)
|
require.Nil(cErr)
|
||||||
|
|
||||||
w := c.Walk("/root")
|
w := c.Walk("/root")
|
||||||
w.cur = &item{
|
w.cur = &item{
|
||||||
|
Loading…
Reference in New Issue
Block a user