serve ftp: refactor to bring into line with other serve commands

This commit is contained in:
Nick Craig-Wood 2019-08-01 11:43:06 +01:00
parent d75fbe4852
commit b94eef16c1
4 changed files with 67 additions and 88 deletions

View file

@ -16,7 +16,6 @@ import (
ftp "github.com/goftp/server"
_ "github.com/rclone/rclone/backend/local"
"github.com/rclone/rclone/cmd/serve/ftp/ftpopt"
"github.com/rclone/rclone/fstest"
"github.com/stretchr/testify/assert"
)
@ -30,7 +29,7 @@ const (
// TestFTP runs the ftp server then runs the unit tests for the
// ftp remote against it.
func TestFTP(t *testing.T) {
opt := ftpopt.DefaultOpt
opt := DefaultOpt
opt.ListenAddr = testHOST + ":" + testPORT
opt.PassivePorts = testPASSIVEPORTRANGE
opt.BasicUser = "rclone"