mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-07-02 21:52:51 +08:00
add timeout
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
c575a3d4af
commit
770fb6c31b
@ -431,7 +431,7 @@ func TestFingerprint(t *testing.T) {
|
|||||||
buffer bytes.Buffer
|
buffer bytes.Buffer
|
||||||
expected = `
|
expected = `
|
||||||
localhost: ======CMD======
|
localhost: ======CMD======
|
||||||
localhost: pwd
|
localhost: whoami
|
||||||
localhost: ======END======
|
localhost: ======END======
|
||||||
localhost: out: drone-scp
|
localhost: out: drone-scp
|
||||||
`
|
`
|
||||||
@ -449,7 +449,8 @@ func TestFingerprint(t *testing.T) {
|
|||||||
Script: []string{
|
Script: []string{
|
||||||
"whoami",
|
"whoami",
|
||||||
},
|
},
|
||||||
Fingerprint: ssh.FingerprintSHA256(hostKey),
|
Fingerprint: ssh.FingerprintSHA256(hostKey),
|
||||||
|
CommandTimeout: 10 * time.Second,
|
||||||
},
|
},
|
||||||
Writer: &buffer,
|
Writer: &buffer,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user