add timeout

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2020-05-19 13:41:30 +08:00
parent c575a3d4af
commit 770fb6c31b

View File

@ -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,
} }