Compare commits

..

3 commits

Author SHA1 Message Date
Feng_Qi
3f32c3a325
Merge pull request #21 from TieWay59/fix-test-ssh
Fix:  not enough arguments in call to connect
2023-03-11 22:37:27 +08:00
TieWay59
cfc416503f doc: 增加 Test_SSH 函数描述 2023-03-11 20:43:51 +08:00
TieWay59
fa8ecd9a33 fix: 补齐 connect 函数缺失的参数数量
采用 nil 作为 `keyExchangeList` 从而提供默认的行为
2023-03-11 20:37:40 +08:00

View file

@ -16,9 +16,13 @@ const (
key = "../server.key"
)
// Tests the SSH functionality of the package.
//
// It requires manual input of the local SSH private key path into the key
// variable, and the remote address into the ip variable.
func Test_SSH(t *testing.T) {
var cipherList []string
session, err := connect(username, password, ip, key, port, cipherList)
session, err := connect(username, password, ip, key, port, cipherList, nil)
if err != nil {
t.Error(err)
return