2024-11-18 17:56:36 +08:00
|
|
|
package pusher
|
|
|
|
|
|
|
|
import (
|
|
|
|
"sylixos-uploader/common"
|
2024-11-19 00:31:06 +08:00
|
|
|
"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()
|
|
|
|
|
2024-11-19 00:31:06 +08:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|