From 0b42bdea4ec76592c0a4b3c641c901c15839ef9e Mon Sep 17 00:00:00 2001 From: nre Date: Thu, 3 Feb 2022 14:04:10 +0000 Subject: [PATCH] Register fileExists mock with mapped arguments --- .../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 081017c4..430e34a3 100644 --- a/src/main/groovy/com/lesfurets/jenkins/unit/BasePipelineTest.groovy +++ b/src/main/groovy/com/lesfurets/jenkins/unit/BasePipelineTest.groovy @@ -170,6 +170,7 @@ abstract class BasePipelineTest { println(message) }) helper.registerAllowedMethod("error", [String], { updateBuildStatus('FAILURE') }) + helper.registerAllowedMethod('fileExists', [Map], { Map args -> helper.fileExists(args.file) }) helper.registerAllowedMethod('fileExists', [String], { String arg -> helper.fileExists(arg) }) helper.registerAllowedMethod("gatlingArchive") helper.registerAllowedMethod("gitlabBuilds", [Map, Closure])