You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-11-06 09:09:19 +02:00
abapEnvironmentPipeline: testBuild Parameter (#4108)
* testBuild Parameter, first try * add testBuild to general_config_keys * hard coded stageName * skip stage publish for testBuild * add missing import
This commit is contained in:
@@ -59,7 +59,6 @@ class AbapEnvironmentPipelineStageBuildTest extends BasePiperTest {
|
||||
'abapAddonAssemblyKitCreateTargetVector',
|
||||
'abapAddonAssemblyKitPublishTargetVector'))
|
||||
assertThat(stepsCalled, not(hasItems('abapEnvironmentCreateTag')))
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -80,4 +79,22 @@ class AbapEnvironmentPipelineStageBuildTest extends BasePiperTest {
|
||||
assertThat(stepsCalled, not(hasItems('cloudFoundryCreateServiceKey')))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testAbapEnvironmentRunTest4TestBuild() {
|
||||
nullScript.commonPipelineEnvironment.configuration.runStage = [
|
||||
'Build': true
|
||||
]
|
||||
jsr.step.abapEnvironmentPipelineStageBuild(script: nullScript, testBuild: true, generateTagForAddonComponentVersion: true)
|
||||
|
||||
assertThat(stepsCalled, hasItems('cloudFoundryCreateServiceKey',
|
||||
'abapEnvironmentAssemblePackages',
|
||||
'abapEnvironmentBuild',
|
||||
'abapAddonAssemblyKitRegisterPackages',
|
||||
'abapAddonAssemblyKitCreateTargetVector'))
|
||||
assertThat(stepsCalled, not(hasItems('abapAddonAssemblyKitReleasePackages',
|
||||
'abapEnvironmentAssembleConfirm',
|
||||
'abapAddonAssemblyKitPublishTargetVector',
|
||||
'abapEnvironmentCreateTag')))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -97,4 +97,19 @@ class abapEnvironmentPipelineStageIntegrationTestsTest extends BasePiperTest {
|
||||
assertThat(stepsCalled, hasItems('cloudFoundryDeleteService'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testIntegrationTestsTageSkipped4testBuild() {
|
||||
|
||||
nullScript.commonPipelineEnvironment.configuration.runStage = [
|
||||
'Integration Tests': true
|
||||
]
|
||||
jsr.step.abapEnvironmentPipelineStageIntegrationTests(script: nullScript, testBuild: true)
|
||||
|
||||
assertThat(stepsCalled, not(hasItems('input',
|
||||
'abapEnvironmentCreateSystem',
|
||||
'cloudFoundryDeleteService',
|
||||
'abapEnvironmentBuild',
|
||||
'cloudFoundryCreateServiceKey')))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,4 +48,11 @@ class abapEnvironmentPipelineStagePublishTest extends BasePiperTest {
|
||||
|
||||
assertThat(stepsCalled, hasItem('abapAddonAssemblyKitPublishTargetVector'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testPublishSkipped4testBuild() {
|
||||
nullScript.commonPipelineEnvironment.configuration.runStage = []
|
||||
jsr.step.abapEnvironmentPipelineStagePublish(script: nullScript, testBuild: true)
|
||||
assertThat(stepsCalled, not(hasItem('abapAddonAssemblyKitPublishTargetVector')))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user