1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

add additional test case

This commit is contained in:
Christopher Fenner 2018-02-05 13:33:15 +01:00
parent bf1a2a98e0
commit 853bc963c0
2 changed files with 27 additions and 0 deletions

View File

@ -65,6 +65,22 @@ class ChecksPublishResultsTest extends BasePipelineTest {
assertTrue("WarningsPublisher options not empty", publisherStepOptions['WarningsPublisher'] == null) assertTrue("WarningsPublisher options not empty", publisherStepOptions['WarningsPublisher'] == null)
} }
@Test
void testPublishForJavaWithChangedDefaultSettings() throws Exception {
// pmd has been set to active: true in step configuration
stepUnderTest.call()
//TODO: add rule to load different pipeline config
//TODO: adapt isMap to not override the step config
assertTrue("AnalysisPublisher options not set", publisherStepOptions['AnalysisPublisher'] != null)
assertTrue("PmdPublisher options not set", publisherStepOptions['PmdPublisher'] != null)
// ensure nothing else is published
assertTrue("DryPublisher options not empty", publisherStepOptions['DryPublisher'] == null)
assertTrue("FindBugsPublisher options not empty", publisherStepOptions['FindBugsPublisher'] == null)
assertTrue("CheckStylePublisher options not empty", publisherStepOptions['CheckStylePublisher'] == null)
assertTrue("WarningsPublisher options not empty", publisherStepOptions['WarningsPublisher'] == null)
}
@Test @Test
void testPublishForJavaScriptWithDefaultSettings() throws Exception { void testPublishForJavaScriptWithDefaultSettings() throws Exception {
stepUnderTest.call(eslint: true) stepUnderTest.call(eslint: true)

View File

@ -0,0 +1,11 @@
#Project Setup
general:
productiveBranch: 'develop'
#Steps Specific Configuration
steps:
mavenExecute:
dockerImage: 'my-maven-docker'
checksPublishResults:
pmd:
active: true