sylixos-uploader/pusher/ftp_pusher_test.go

22 lines
397 B
Go
Raw Normal View History

2024-11-18 17:56:36 +08:00
package pusher
import (
"sylixos-uploader/common"
"sylixos-uploader/log"
2024-11-18 17:56:36 +08:00
"testing"
)
func TestPush(t *testing.T) {
p := NewFtpPusher("10.13.16.202")
if err := p.Login(common.SylixOSUser, common.SylixOSPassword); err != nil {
t.Error(err)
}
defer p.Logout()
err := p.Push("./", "/apps/ftp_pusher_test", log.DefaultLogger, log.DefaultClearLinesUp)
2024-11-18 17:56:36 +08:00
if err != nil {
t.Error(err)
}
}