mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
remove duplicated mtarFilePath assertions
mtarFile Path must be checked only when it is in the scope of the unit test.
This commit is contained in:
parent
4aa4a1d2f5
commit
7f3f76a8ad
@ -60,7 +60,7 @@ public class MTABuildTest extends BasePipelineTest {
|
||||
|
||||
new File("${currentDir}/mta.yaml") << defaultMtaYaml()
|
||||
|
||||
def mtarFilePath = mtaBuildScript.call(buildTarget: 'NEO')
|
||||
mtaBuildScript.call(buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[0] =~ /sed -ie "s\/\\\$\{timestamp\}\/`date \+%Y%m%d%H%M%S`\/g" ".*\/mta.yaml"$/
|
||||
|
||||
@ -68,8 +68,6 @@ public class MTABuildTest extends BasePipelineTest {
|
||||
|
||||
assert jscr.shell[1].contains(' -jar /opt/mta/mta.jar --mtar ')
|
||||
|
||||
assert mtarFilePath == "${currentDir}/com.mycompany.northwind.mtar"
|
||||
|
||||
assert jlr.log.contains( "[mtaBuild] MTA JAR \"/opt/mta/mta.jar\" retrieved from environment.")
|
||||
}
|
||||
|
||||
@ -130,7 +128,7 @@ public class MTABuildTest extends BasePipelineTest {
|
||||
|
||||
new File("${currentDir}/mta.yaml") << defaultMtaYaml()
|
||||
|
||||
def mtarFilePath = mtaBuildScript.call(buildTarget: 'NEO')
|
||||
mtaBuildScript.call(buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[0] =~ /sed -ie "s\/\\\$\{timestamp\}\/`date \+%Y%m%d%H%M%S`\/g" ".*\/mta.yaml"$/
|
||||
|
||||
@ -138,8 +136,6 @@ public class MTABuildTest extends BasePipelineTest {
|
||||
|
||||
assert jscr.shell[1].contains(' -jar mta.jar --mtar ')
|
||||
|
||||
assert mtarFilePath == "${currentDir}/com.mycompany.northwind.mtar"
|
||||
|
||||
assert jlr.log.contains( "[mtaBuild] Using MTA JAR from current working directory." )
|
||||
}
|
||||
|
||||
@ -149,7 +145,7 @@ public class MTABuildTest extends BasePipelineTest {
|
||||
|
||||
new File("${currentDir}/mta.yaml") << defaultMtaYaml()
|
||||
|
||||
def mtarFilePath = mtaBuildScript.call(mtaJarLocation: '/mylocation/mta', buildTarget: 'NEO')
|
||||
mtaBuildScript.call(mtaJarLocation: '/mylocation/mta', buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[0] =~ /sed -ie "s\/\\\$\{timestamp\}\/`date \+%Y%m%d%H%M%S`\/g" ".*\/mta.yaml"$/
|
||||
|
||||
@ -157,8 +153,6 @@ public class MTABuildTest extends BasePipelineTest {
|
||||
|
||||
assert jscr.shell[1].contains(' -jar /mylocation/mta/mta.jar --mtar ')
|
||||
|
||||
assert mtarFilePath == "${currentDir}/com.mycompany.northwind.mtar"
|
||||
|
||||
assert jlr.log.contains("[mtaBuild] MTA JAR \"/mylocation/mta/mta.jar\" retrieved from parameters.".toString())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user