阶段性提交

This commit is contained in:
刘祥超
2020-09-06 16:19:54 +08:00
parent 5c17caa416
commit 6f5faf66f7
37 changed files with 3134 additions and 91 deletions

View File

@@ -0,0 +1,35 @@
package installers
import "testing"
func TestNodeInstaller_Install(t *testing.T) {
var installer InstallerInterface = &NodeInstaller{}
err := installer.Login(&Credentials{
Host: "192.168.2.30",
Port: 22,
Username: "root",
Password: "123456",
PrivateKey: "",
})
if err != nil {
t.Fatal(err)
}
// 关闭连接
defer func() {
err := installer.Close()
if err != nil {
t.Fatal(err)
}
}()
// 安装
err = installer.Install("/opt/edge", &NodeParams{
Endpoint: "192.168.2.40:8003",
NodeId: "313fdb1b90d0a63c736f307b4d1ca358",
Secret: "Pl3u5kYqBDZddp7raw6QfHiuGPRCWF54",
})
if err != nil {
t.Fatal(err)
}
}