use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class MavenPluginTest method build_multimodule.
@Test
public void build_multimodule() {
installSomeMaven(jenkins);
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
job.configure();
job.copyDir(resource("/maven_plugin/multimodule/"));
job.goals.set("package");
job.save();
job.startBuild().shouldSucceed().shouldContainsConsoleOutput("Building root 1.0").shouldContainsConsoleOutput("Building module_a 2.0").shouldContainsConsoleOutput("Building module_b 3.0");
assertHasModule(job, "gid$root");
assertHasModule(job, "gid$module_a");
assertHasModule(job, "gid$module_b");
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class JobConfigHistoryPluginTest method track_change_in_maven_project.
@Test
@Issue("JENKINS-24410")
@WithPlugins("maven-plugin")
public void track_change_in_maven_project() {
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
JobConfigHistory history = job.action(JobConfigHistory.class);
List<Change> original = history.getChanges();
job.configure();
job.goals.set("clean");
job.save();
List<Change> newOnes = history.getChanges();
assertThat("New changes saved", newOnes.size(), greaterThan(original.size()));
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class FindBugsPluginTest method should_set_result_to_unstable_if_warning_found.
/**
* Builds a maven project and checks if it is unstable.
*/
@Test
public void should_set_result_to_unstable_if_warning_found() {
MavenModuleSet job = createMavenJob(settings -> settings.setBuildUnstableTotalAll("0"));
buildJobAndWait(job).shouldBeUnstable();
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class PmdPluginTest method should_set_result_to_failed_if_warning_found.
/**
* Builds a maven project and checks if it failed.
*/
@Test
public void should_set_result_to_failed_if_warning_found() {
MavenModuleSet job = createMavenJob(settings -> settings.setBuildFailedTotalAll("0"));
buildJobAndWait(job).shouldFail();
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class ViolationsPluginTest method maven.
@Test
public void maven() {
MavenInstallation.installSomeMaven(jenkins);
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
job.configure();
job.copyDir(resource("/violations_plugin"));
new Violations(job).config("fxcop").pattern("fxcop/*");
job.save();
job.startBuild().shouldSucceed();
MavenModule module = job.module("gid$example");
MavenModuleBuild moduleBuild = module.getLastBuild();
assertThat(module.action(ViolationsAction.class), hasViolations("fxcop", "2", "2"));
assertThat(moduleBuild.action(ViolationsAction.class), hasViolations("fxcop", "2", "2"));
}
Aggregations