use of org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorSettings in project acceptance-test-harness by jenkinsci.
the class AnalysisCollectorPluginTest method deselectPluginAndBuild.
private AnalysisCollectorAction deselectPluginAndBuild(AnalysisPlugin plugin, Job job) {
job.configure();
AnalysisCollectorSettings publisher = job.getPublisher(AnalysisCollectorSettings.class);
publisher.checkCollectedPlugin(plugin, false);
job.save();
Build build = buildSuccessfulJob(job);
AnalysisCollectorAction action = new AnalysisCollectorAction(build);
action.open();
return action;
}
use of org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorSettings in project acceptance-test-harness by jenkinsci.
the class AnalysisCollectorPluginTest method should_set_build_result_to_unstable.
/**
* Verifies that a build should become status unstable when a warning threshold is exceeded.
*/
@Test
public void should_set_build_result_to_unstable() {
FreeStyleJob job = jenkins.jobs.create();
job.configure();
job.copyResource(ANALYSIS_COLLECTOR_PLUGIN_RESOURCES + "/findbugs.xml");
job.addPublisher(FindBugsFreestyleSettings.class);
AnalysisCollectorSettings analysis = job.addPublisher(AnalysisCollectorSettings.class);
AnalysisConfigurator<AnalysisCollectorSettings> configurator = settings -> settings.setBuildUnstableTotalAll("5");
configurator.accept(analysis);
job.save();
buildUnstableJob(job);
}
Aggregations