mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-02-07 13:42:23 +02:00
add missing file
This commit is contained in:
parent
fed20184b4
commit
2e2b43d68b
@ -9,10 +9,11 @@ import com.lesfurets.jenkins.unit.BasePipelineTest
|
|||||||
import static org.junit.Assert.assertEquals
|
import static org.junit.Assert.assertEquals
|
||||||
import static org.junit.Assert.assertTrue
|
import static org.junit.Assert.assertTrue
|
||||||
|
|
||||||
|
import util.BasePiperTest
|
||||||
import util.JenkinsShellCallRule
|
import util.JenkinsShellCallRule
|
||||||
import util.Rules
|
import util.Rules
|
||||||
|
|
||||||
class MavenExecuteTest extends BasePipelineTest {
|
class MavenExecuteTest extends BasePiperTest {
|
||||||
|
|
||||||
Map dockerParameters
|
Map dockerParameters
|
||||||
|
|
||||||
@ -23,7 +24,6 @@ class MavenExecuteTest extends BasePipelineTest {
|
|||||||
.around(jscr)
|
.around(jscr)
|
||||||
|
|
||||||
def mavenExecuteScript
|
def mavenExecuteScript
|
||||||
def cpe
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
void init() {
|
void init() {
|
||||||
@ -37,13 +37,12 @@ class MavenExecuteTest extends BasePipelineTest {
|
|||||||
})
|
})
|
||||||
|
|
||||||
mavenExecuteScript = loadScript("mavenExecute.groovy").mavenExecute
|
mavenExecuteScript = loadScript("mavenExecute.groovy").mavenExecute
|
||||||
cpe = loadScript('commonPipelineEnvironment.groovy').commonPipelineEnvironment
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testExecuteBasicMavenCommand() throws Exception {
|
void testExecuteBasicMavenCommand() throws Exception {
|
||||||
|
|
||||||
mavenExecuteScript.call(script: [commonPipelineEnvironment: cpe], goals: 'clean install')
|
mavenExecuteScript.call(script: nullScript, goals: 'clean install')
|
||||||
assertEquals('maven:3.5-jdk-7', dockerParameters.dockerImage)
|
assertEquals('maven:3.5-jdk-7', dockerParameters.dockerImage)
|
||||||
|
|
||||||
assert jscr.shell[0] == 'mvn clean install'
|
assert jscr.shell[0] == 'mvn clean install'
|
||||||
@ -53,7 +52,7 @@ class MavenExecuteTest extends BasePipelineTest {
|
|||||||
void testExecuteMavenCommandWithParameter() throws Exception {
|
void testExecuteMavenCommandWithParameter() throws Exception {
|
||||||
|
|
||||||
mavenExecuteScript.call(
|
mavenExecuteScript.call(
|
||||||
script: [commonPipelineEnvironment: cpe],
|
script: nullScript,
|
||||||
dockerImage: 'maven:3.5-jdk-8-alpine',
|
dockerImage: 'maven:3.5-jdk-8-alpine',
|
||||||
goals: 'clean install',
|
goals: 'clean install',
|
||||||
globalSettingsFile: 'globalSettingsFile.xml',
|
globalSettingsFile: 'globalSettingsFile.xml',
|
||||||
@ -70,7 +69,7 @@ class MavenExecuteTest extends BasePipelineTest {
|
|||||||
@Test
|
@Test
|
||||||
void testMavenCommandForwardsDockerOptions() throws Exception {
|
void testMavenCommandForwardsDockerOptions() throws Exception {
|
||||||
|
|
||||||
mavenExecuteScript.call(script: [commonPipelineEnvironment: cpe], goals: 'clean install')
|
mavenExecuteScript.call(script: nullScript, goals: 'clean install')
|
||||||
assertEquals('maven:3.5-jdk-7', dockerParameters.dockerImage)
|
assertEquals('maven:3.5-jdk-7', dockerParameters.dockerImage)
|
||||||
|
|
||||||
assert jscr.shell[0] == 'mvn clean install'
|
assert jscr.shell[0] == 'mvn clean install'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user