1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/test/groovy/util
Stephan Aßmus 9658f3b480
writeFile() cannot be passed a Map (#1163)
* writeFile() cannot be passed a Map

I've changed the return type of DebugReport.generateReport() from
String to Map in order to get the generated file name as part of the
return value instead of getting it from a field of DebugReport. The
UnitTest checks whether writeFile() creates the debug_report file
successfully and whether it has the expected contents. The effect
of passing the Map instead of map.contents to writeFile() should
have been an unnecessary wrapping via Map.toString() as in the test,
but in the execution context of Jenkins, this throws an
IllegalArgumentException: Could not instantiate {... and then the
results of map.toString().

* Improve JenkinsWriteFileRule compatibility

Calling m.text.toString() is wrong, since the type stored at m.text
already needs to be a String (or GString). Expecting valid parameters
here makes sure problems are detected by tests already. (All tests
pass as before.)
2020-02-10 12:25:33 +01:00
..
BasePiperTest.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
BasePiperTestContext.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
CommandLineMatcher.groovy Introduce xsDeploy step (#749) 2019-09-11 13:42:38 +02:00
JenkinsCredentialsRule.groovy Use JenkinsCredentialsRule 2019-04-01 15:59:20 +02:00
JenkinsDockerExecuteRule.groovy speed up tests 2018-06-06 11:19:19 +02:00
JenkinsEnvironmentRule.groovy add steps for file stashing 2018-05-30 12:00:13 +02:00
JenkinsErrorRule.groovy add error rule as common rule 2018-02-01 10:11:37 +01:00
JenkinsFileExistsRule.groovy Persisted pipeline environment for golang library (#1091) 2020-01-15 12:16:25 +01:00
JenkinsInfluxDataRule.groovy influxWriteData: hold data in dedicated object (#624) 2019-04-11 11:39:41 +02:00
JenkinsLockRule.groovy Improve neo deploy (#440) 2019-01-28 11:32:24 +01:00
JenkinsLoggingRule.groovy Variable Substitution in YAML Files (#852) 2019-09-06 10:20:35 +02:00
JenkinsMockStepRule.groovy add multicloud deploy step 2019-04-12 17:51:38 +02:00
JenkinsPropertiesRule.groovy Improve neo deploy (#440) 2019-01-28 11:32:24 +01:00
JenkinsReadFileRule.groovy [refactor] CPE read/write from/to disk: remote repetitive coding (#1110) 2020-01-28 13:22:37 +01:00
JenkinsReadJsonRule.groovy add steps for file stashing 2018-05-30 12:00:13 +02:00
JenkinsReadMavenPomRule.groovy Step for automatic versioning (#65) 2018-02-07 13:17:33 +01:00
JenkinsReadYamlRule.groovy Variable Substitution in YAML Files (#852) 2019-09-06 10:20:35 +02:00
JenkinsResetDefaultCacheRule.groovy Revert "Back commonPipelineEnvironment step by shared class" 2019-11-26 10:43:59 +01:00
JenkinsScriptLoaderRule.groovy Initial check-in of lesfurets test improvements (#23) 2018-01-10 10:27:55 +01:00
JenkinsSetupRule.groovy add step for Sonar scan (#183) 2019-05-13 12:29:07 +02:00
JenkinsShellCallRule.groovy Simplify code: failExecution can be replaced by closure raising exception (#795) 2019-08-06 13:12:59 +02:00
JenkinsStepRule.groovy add multicloud deploy step 2019-04-12 17:51:38 +02:00
JenkinsWithEnvRule.groovy Improve neo deploy (#440) 2019-01-28 11:32:24 +01:00
JenkinsWriteFileRule.groovy writeFile() cannot be passed a Map (#1163) 2020-02-10 12:25:33 +01:00
JenkinsWriteJsonRule.groovy artifactSetVersion - add new artifact types & cleanup (#242) 2018-08-08 22:21:26 +02:00
JenkinsWriteYamlRule.groovy Variable Substitution in YAML Files (#852) 2019-09-06 10:20:35 +02:00
LibraryLoadingTestExecutionListener.groovy Merge remote-tracking branch 'github/master' into HEAD 2019-05-17 12:05:34 +02:00
PipelineWhenException.groovy remove semikolons 2019-05-23 14:28:32 +02:00
PluginMock.groovy Enable support for executing on K8S as a step (#231) 2018-08-21 15:45:59 +02:00
ProjectSource.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
Rules.groovy influxWriteData: hold data in dedicated object (#624) 2019-04-11 11:39:41 +02:00
SharedLibraryCreator.groovy [refactoring] Remove redundant code 2018-01-16 09:43:24 +01:00
StepHelper.groovy remove semikolons 2019-05-23 14:28:32 +02:00
StepTracker.groovy Create step specific plugin lists: Helper class for tracking step calls 2019-03-27 16:02:04 +01:00