From cafa0a703bbd16b5789d40d045464604be2a3234 Mon Sep 17 00:00:00 2001 From: Alejandra Ferreiro Vidal Date: Mon, 5 Feb 2018 15:39:18 +0100 Subject: [PATCH] format String as String not GString See: https://github.com/SAP/jenkins-library/blob/master/CONTRIBUTING.md#use-single-quotes-for-strings-and-constants --- test/groovy/MTABuildTest.groovy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/groovy/MTABuildTest.groovy b/test/groovy/MTABuildTest.groovy index 7f1ee6a14..8e26c40f2 100644 --- a/test/groovy/MTABuildTest.groovy +++ b/test/groovy/MTABuildTest.groovy @@ -47,7 +47,7 @@ public class MTABuildTest extends BasePipelineTest { binding.setVariable('PATH', '/usr/bin') - mtaBuildScript = loadScript("mtaBuild.groovy").mtaBuild + mtaBuildScript = loadScript('mtaBuild.groovy').mtaBuild cpe = loadScript('commonPipelineEnvironment.groovy').commonPipelineEnvironment } @@ -59,7 +59,7 @@ public class MTABuildTest extends BasePipelineTest { mtaBuildScript.call(buildTarget: 'NEO') - assert jscr.shell[1].contains("PATH=./node_modules/.bin:/usr/bin") + assert jscr.shell[1].contains('PATH=./node_modules/.bin:/usr/bin') } @@ -120,7 +120,7 @@ public class MTABuildTest extends BasePipelineTest { assert jscr.shell[1].contains(' -jar mta.jar --mtar ') - assert jlr.log.contains( "[mtaBuild] Using MTA JAR from current working directory." ) + assert jlr.log.contains('[mtaBuild] Using MTA JAR from current working directory.') } @@ -135,7 +135,7 @@ public class MTABuildTest extends BasePipelineTest { assert jscr.shell[1].contains(' -jar /mylocation/mta/mta.jar --mtar ') - assert jlr.log.contains("[mtaBuild] MTA JAR \"/mylocation/mta/mta.jar\" retrieved from parameters.".toString()) + assert jlr.log.contains('[mtaBuild] MTA JAR "/mylocation/mta/mta.jar" retrieved from parameters.') } @@ -172,7 +172,7 @@ public class MTABuildTest extends BasePipelineTest { @Test public void noBuildTargetTest(){ thrown.expect(Exception) - thrown.expectMessage("ERROR - NO VALUE AVAILABLE FOR buildTarget") + thrown.expectMessage('ERROR - NO VALUE AVAILABLE FOR buildTarget') new File("${currentDir}/mta.yaml") << defaultMtaYaml()