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:
parent
bf1a2a98e0
commit
853bc963c0
@ -65,6 +65,22 @@ class ChecksPublishResultsTest extends BasePipelineTest {
|
||||
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
|
||||
void testPublishForJavaScriptWithDefaultSettings() throws Exception {
|
||||
stepUnderTest.call(eslint: true)
|
||||
|
11
test/resources/ChecksPublishResults/test_pipeline_config.yml
Normal file
11
test/resources/ChecksPublishResults/test_pipeline_config.yml
Normal file
@ -0,0 +1,11 @@
|
||||
#Project Setup
|
||||
general:
|
||||
productiveBranch: 'develop'
|
||||
|
||||
#Steps Specific Configuration
|
||||
steps:
|
||||
mavenExecute:
|
||||
dockerImage: 'my-maven-docker'
|
||||
checksPublishResults:
|
||||
pmd:
|
||||
active: true
|
Loading…
Reference in New Issue
Block a user