From 5c24e2955afaea105ef738cfa9030ddc48fdff26 Mon Sep 17 00:00:00 2001 From: Feng Yu <F3n67u@outlook.com> Date: Thu, 28 Oct 2021 17:42:21 +0800 Subject: [PATCH] test: add timeout option test for exec (#12278) --- lib/util/exec/index.spec.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/util/exec/index.spec.ts b/lib/util/exec/index.spec.ts index f1aee6700d..6480b8b54c 100644 --- a/lib/util/exec/index.spec.ts +++ b/lib/util/exec/index.spec.ts @@ -521,6 +521,28 @@ describe('util/exec/index', () => { }, ], + [ + 'Explicit timeout', + { + processEnv, + inCmd, + inOpts: { + timeout: 20 * 60 * 1000, + }, + outCmd, + outOpts: [ + { + cwd, + encoding, + env: envMock.basic, + timeout: 20 * 60 * 1000, + maxBuffer: 10485760, + }, + ], + adminConfig: { binarySource: 'docker' }, + }, + ], + [ 'Explicit maxBuffer', { -- GitLab