From 770fb6c31bbccf67667e83b1f78fe71735c0e401 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 19 May 2020 13:41:30 +0800 Subject: [PATCH] add timeout Signed-off-by: Bo-Yi Wu --- plugin_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin_test.go b/plugin_test.go index 20a082f..133b83e 100644 --- a/plugin_test.go +++ b/plugin_test.go @@ -431,7 +431,7 @@ func TestFingerprint(t *testing.T) { buffer bytes.Buffer expected = ` localhost: ======CMD====== - localhost: pwd + localhost: whoami localhost: ======END====== localhost: out: drone-scp ` @@ -449,7 +449,8 @@ func TestFingerprint(t *testing.T) { Script: []string{ "whoami", }, - Fingerprint: ssh.FingerprintSHA256(hostKey), + Fingerprint: ssh.FingerprintSHA256(hostKey), + CommandTimeout: 10 * time.Second, }, Writer: &buffer, }