From 3541b83a9ef6748ebd01ab14a6e5a829f23fd4f2 Mon Sep 17 00:00:00 2001 From: Chris Wiggins Date: Tue, 24 Nov 2020 14:39:21 -0700 Subject: [PATCH] Adding unzip mock This commit adds a mocked method for 'unzip'. This will help when someone needs to use the unzip step, making it so they don't have to mock it for the test to succeed. --- .../groovy/com/lesfurets/jenkins/unit/BasePipelineTest.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/groovy/com/lesfurets/jenkins/unit/BasePipelineTest.groovy b/src/main/groovy/com/lesfurets/jenkins/unit/BasePipelineTest.groovy index 6d4c7ffb..18f8d334 100644 --- a/src/main/groovy/com/lesfurets/jenkins/unit/BasePipelineTest.groovy +++ b/src/main/groovy/com/lesfurets/jenkins/unit/BasePipelineTest.groovy @@ -224,6 +224,7 @@ abstract class BasePipelineTest { helper.registerAllowedMethod('tool', [Map], { t -> "${t.name}_HOME" }) helper.registerAllowedMethod("unstable", [String], { updateBuildStatus('UNSTABLE') }) helper.registerAllowedMethod('unstash', [Map]) + helper.registerAllowedMethod('unzip', [Map]) helper.registerAllowedMethod('usernamePassword', [Map], usernamePasswordInterceptor) helper.registerAllowedMethod('waitUntil', [Closure]) helper.registerAllowedMethod("warnError", [String, Closure], { String arg, Closure c ->