Test PASV as well

This commit is contained in:
Julian Kornberger 2015-08-20 01:46:22 +02:00
parent 201b5505ae
commit 5bb86ee66f

View File

@ -13,7 +13,15 @@ const (
testDir = "mydir"
)
func TestConn(t *testing.T) {
func TestConnPASV(t *testing.T) {
testConn(t, true)
}
func TestConnEPSV(t *testing.T) {
testConn(t, false)
}
func testConn(t *testing.T, passive bool) {
if testing.Short() {
t.Skip("skipping test in short mode.")
}
@ -23,6 +31,10 @@ func TestConn(t *testing.T) {
t.Fatal(err)
}
if passive {
delete(c.features, "EPSV")
}
err = c.Login("anonymous", "anonymous")
if err != nil {
t.Fatal(err)