mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-30 05:59:39 +02:00
Make test more tolerant
This commit is contained in:
parent
6d2dcd5b52
commit
9c544bb6e0
@ -67,7 +67,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
jsr.step.call(buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[1].contains('PATH=./node_modules/.bin:/usr/bin')
|
||||
assert jscr.shell.find { c -> c.contains('PATH=./node_modules/.bin:/usr/bin')}
|
||||
}
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
jsr.step.call(buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[0] =~ /sed -ie "s\/\\\$\{timestamp\}\/`date \+%Y%m%d%H%M%S`\/g" ".*\/mta.yaml"$/
|
||||
assert jscr.shell.find { c -> c =~ /sed -ie "s\/\\\$\{timestamp\}\/`date \+%Y%m%d%H%M%S`\/g" ".*\/mta.yaml"$/}
|
||||
}
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
def mtarFilePath = jsr.step.call(buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[0] =~ /sed -ie "s\/\\\$\{timestamp\}\/`date \+%Y%m%d%H%M%S`\/g" ".*\/newDir\/mta.yaml"$/
|
||||
assert jscr.shell.find { c -> c =~ /sed -ie "s\/\\\$\{timestamp\}\/`date \+%Y%m%d%H%M%S`\/g" ".*\/newDir\/mta.yaml"$/}
|
||||
|
||||
assert mtarFilePath == "$newDir/com.mycompany.northwind.mtar"
|
||||
}
|
||||
@ -110,7 +110,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
jsr.step.call(buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[1].contains(' -jar mta.jar --mtar ')
|
||||
assert jscr.shell.find { c -> c.contains(' -jar mta.jar --mtar ')}
|
||||
|
||||
assert jlr.log.contains('[mtaBuild] Using MTA JAR from current working directory.')
|
||||
}
|
||||
@ -121,7 +121,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
jsr.step.call(mtaJarLocation: '/mylocation/mta', buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[1].contains(' -jar /mylocation/mta/mta.jar --mtar ')
|
||||
assert jscr.shell.find { c -> c.contains(' -jar /mylocation/mta/mta.jar --mtar ')}
|
||||
|
||||
assert jlr.log.contains('[mtaBuild] MTA JAR "/mylocation/mta/mta.jar" retrieved from configuration.')
|
||||
}
|
||||
@ -169,7 +169,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
jsr.step.call(buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[1].contains('-jar /env/mta/mta.jar --mtar')
|
||||
assert jscr.shell.find { c -> c.contains('-jar /env/mta/mta.jar --mtar')}
|
||||
assert jlr.log.contains('[mtaBuild] MTA JAR "/env/mta/mta.jar" retrieved from environment.')
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
jsr.step.call(script: [commonPipelineEnvironment: jer.env],
|
||||
buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[1].contains('-jar /step/mta/mta.jar --mtar')
|
||||
assert jscr.shell.find(){ c -> c.contains('-jar /step/mta/mta.jar --mtar')}
|
||||
assert jlr.log.contains('[mtaBuild] MTA JAR "/step/mta/mta.jar" retrieved from configuration.')
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
jsr.step.call(buildTarget: 'NEO')
|
||||
|
||||
assert jscr.shell[1].contains('java -jar mta.jar --mtar com.mycompany.northwind.mtar --build-target=NEO build')
|
||||
assert jscr.shell.find { c -> c.contains('java -jar mta.jar --mtar com.mycompany.northwind.mtar --build-target=NEO build')}
|
||||
}
|
||||
|
||||
|
||||
@ -203,7 +203,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
jsr.step.call(script: [commonPipelineEnvironment: jer.env])
|
||||
|
||||
assert jscr.shell[1].contains('java -jar mta.jar --mtar com.mycompany.northwind.mtar --build-target=NEO build')
|
||||
assert jscr.shell.find(){ c -> c.contains('java -jar mta.jar --mtar com.mycompany.northwind.mtar --build-target=NEO build')}
|
||||
}
|
||||
|
||||
|
||||
@ -214,7 +214,7 @@ public class MtaBuildTest extends BasePipelineTest {
|
||||
|
||||
jsr.step.call(script: [commonPipelineEnvironment: jer.env])
|
||||
|
||||
assert jscr.shell[1].contains('java -jar mta.jar --mtar com.mycompany.northwind.mtar --build-target=NEO build')
|
||||
assert jscr.shell.find { c -> c.contains('java -jar mta.jar --mtar com.mycompany.northwind.mtar --build-target=NEO build')}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user