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
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
..
com/sap/piper Implement archiving the debug report as step (#1152) 2020-02-07 16:30:08 +01:00
templates Patch Urls (#929) 2019-11-11 17:40:23 +01:00
util writeFile() cannot be passed a Map (#1163) 2020-02-10 12:25:33 +01:00
AbapEnvironmentPullGitRepoTest.groovy Go implementation for abapEnvironmentPullGitRepo() (#1107) 2020-02-04 11:43:27 +01:00
ArtifactSetVersionTest.groovy Use maven evaluate for mavenArtifactVersioning 2020-01-23 09:31:01 +01:00
BatsExecuteTestsTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
BuildExecuteTest.groovy Add step buildExecute (#527) 2019-07-02 13:00:36 +02:00
CfManifestSubstituteVariablesTest.groovy Variable Substitution in YAML Files (#852) 2019-09-06 10:20:35 +02:00
CheckChangeInDevelopmentTest.groovy checkChangeInDevelopment with docker 2019-03-19 10:07:18 +01:00
CheckmarxExecuteScanTest.groovy Avoid potential collisions among steps (#1141) 2020-02-03 15:25:49 +01:00
ChecksPublishResultsTest.groovy Revert "ConfigurationLoader, ConfigurationHelper working without script reference" 2019-11-26 10:51:32 +01:00
CloudFoundryCreateServiceKeyTest.groovy add parameter compatibilitiy to cloudFoundryCreateServiceKey (#1065) 2019-12-16 16:36:13 +00:00
CloudFoundryCreateServiceTest.groovy Fix bug and added documentation for cloudFoundryCreateService step (#967) 2019-11-12 10:29:08 +01:00
CloudFoundryDeployTest.groovy Disable or fail on blue green deployment if not supported by manifest structure (#1160) 2020-02-07 18:46:03 +01:00
CommonPipelineEnvironmentTest.groovy Pass container image via CPE (#1113) 2020-01-29 16:03:18 +01:00
CommonStepsTest.groovy Protecode as GoLang (#1119) 2020-02-06 16:16:34 +01:00
ContainerExecuteStructureTestsTest.groovy Add step buildExecute (#527) 2019-07-02 13:00:36 +02:00
ContainerPushToRegistryTest.groovy Add step buildExecute (#527) 2019-07-02 13:00:36 +02:00
DebugReportArchiveTest.groovy Implement archiving the debug report as step (#1152) 2020-02-07 16:30:08 +01:00
DetectExecuteScanTest.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
DockerExecuteOnKubernetesTest.groovy Add test handling exception in dockerExecuteOnK8S in case exception is raised. (#1081) 2020-01-29 14:15:12 +01:00
DockerExecuteTest.groovy Handle sidecar parameters in dockerExecuteOnKubernetes (#869) 2019-09-12 10:52:05 +02:00
DubExecuteTest.groovy feat(dub): expose dockerEnvVars and dockerWorkspace in dubExecute (#1012) 2019-12-09 16:24:11 +01:00
DurationMeasureTest.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
FioriOnCloudPlatformPipelineTest.groovy Switch the default for the mta build toolset (#1157) 2020-02-07 12:20:46 +01:00
GaugeExecuteTestsTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
GithubPublishReleaseTest.groovy Persisted pipeline environment for golang library (#1091) 2020-01-15 12:16:25 +01:00
HadolintExecuteTest.groovy Patch Urls (#929) 2019-11-11 17:40:23 +01:00
HandlePipelineStepErrorsTest.groovy Test DebugReport usage in handlePipelineStepErrors 2020-02-03 12:37:20 +01:00
HealthExecuteCheckTest.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
InfluxWriteDataTest.groovy Support InfluxDB plugin in version 2.0 (#1130) 2020-02-06 11:27:31 +01:00
JenkinsMaterializeLogTest.groovy Fix Could not find matching constructor for: hudson.FilePath (#1134) 2020-02-03 12:28:16 +01:00
KanikoExecuteTest.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
KarmaExecuteTestsTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
KubernetesDeployTest.groovy Add kubernetesDeploy step (#1073) 2020-01-24 14:30:27 +01:00
MailSendNotificationTest.groovy Patch Urls (#929) 2019-11-11 17:40:23 +01:00
MavenExecuteTest.groovy Use maven evaluate for mavenArtifactVersioning 2020-01-23 09:31:01 +01:00
MtaBuildTest.groovy Switch the default for the mta build toolset (#1157) 2020-02-07 12:20:46 +01:00
MulticloudDeployTest.groovy User piper docker images (#920) 2019-10-25 17:49:54 +02:00
NeoDeployTest.groovy Simplify code: failExecution can be replaced by closure raising exception (#795) 2019-08-06 13:12:59 +02:00
NewmanExecuteTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
NpmExecuteTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
PipelineExecuteTest.groovy remove utils.getMandatoryParameter() 2019-04-09 16:25:25 +02:00
PipelineRestartStepsTest.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
PipelineStashFilesAfterBuildTest.groovy update stashing behavior (#628) 2019-04-02 13:13:25 +02:00
PipelineStashFilesBeforeBuildTest.groovy remove opa5 stash (#897) 2019-11-07 11:02:27 +01:00
PiperPublishWarningsTest.groovy chore(test): cleanup metaClass (#1104) 2020-01-22 08:57:37 +01:00
PiperStageWrapperTest.groovy Executing extensions in handlePipelineStepErrors 2020-02-04 12:33:13 +01:00
PrepareDefaultValuesTest.groovy remove semikolons 2019-05-23 14:28:32 +02:00
SeleniumExecuteTestsTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
SetupCommonPipelineEnvironmentTest.groovy setupCommonPipelineEnvironment: support yaml config file ending (#811) 2019-07-31 12:22:26 +02:00
SlackSendNotificationTest.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
SnykExecuteTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
SonarExecuteScanTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
SpinnakerTriggerPipelineTest.groovy Add step spinnakerTriggerPipeline (#793) 2019-11-06 15:37:14 +01:00
TestsPublishResultsTest.groovy Make cobertura defaults compatible with UI5 (#941) 2019-11-05 15:33:18 +01:00
TmsUploadTest.groovy Fail early if file which should be uploaded does not exist. (#909) 2019-10-22 12:28:43 +02:00
TransportRequestCreateTest.groovy commonPipelineEnvironment: add propertiesMap (#526) 2019-04-10 10:56:36 +02:00
TransportRequestReleaseTest.groovy release transport request for cts 2019-03-19 10:07:18 +01:00
TransportRequestUploadFileTest.groovy docker for upload file SOLMAN 2019-03-19 10:07:18 +01:00
UiVeri5ExecuteTestsTest.groovy remove !#groovy header 2019-05-23 10:37:28 +02:00
WhitesourceExecuteScanTest.groovy fix(NPM): change NodeJS image to LTS (#1069) 2020-01-29 11:17:56 +01:00
XsDeployTest.groovy Use old approach for resolving mode action and docker related params 2020-01-17 09:40:31 +01:00