Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
|
||
import java.util.SortedMap; | ||
import java.util.TreeMap; | ||
import java.util.function.Consumer; | ||
|
||
import org.jenkinsci.test.acceptance.junit.SmokeTest; | ||
import org.jenkinsci.test.acceptance.junit.WithPlugins; | ||
|
@@ -174,6 +175,28 @@ public void should_set_result_to_unstable_if_warning_found() { | |
buildJobAndWait(job).shouldBeUnstable(); | ||
} | ||
|
||
/** | ||
* Builds a pipeline project and checks if it is unstable. | ||
*/ | ||
@Test | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
uhafner
Author
Member
|
||
public void should_set_pipeline_result() { | ||
verifyResult("unstable", Build::shouldBeUnstable); | ||
verifyResult("failed", Build::shouldFail); | ||
} | ||
|
||
private void verifyResult(final String result, final Consumer<Build> buildResultCheck) { | ||
String[] parameters = {", " + result + "TotalAll: '5'", | ||
", " + result + "TotalHigh: '1'", | ||
", " + result + "TotalNormal: '3'"}; | ||
|
||
for (String additionalParameters : parameters) { | ||
WorkflowJob job = createPipelineWith(FILE_WITH_6_WARNINGS, "FindBugsPublisher", | ||
additionalParameters); | ||
Build build = buildJobAndWait(job); | ||
buildResultCheck.accept(build); | ||
} | ||
} | ||
|
||
/** | ||
* Builds a maven project and checks if it failed. | ||
*/ | ||
|
Does this not need to specify
@WithPlugins
?