use of org.jenkinsci.test.acceptance.po.MatrixProject in project acceptance-test-harness by jenkinsci.
the class MatrixReloadedPluginTest method rebuild_one_combination.
@Test
public void rebuild_one_combination() {
MatrixProject job = jenkins.jobs.create(MatrixProject.class);
job.configure();
TextAxis x = job.addAxis(TextAxis.class);
x.name.set("AAA");
x.valueString.set("111 222");
TextAxis y = job.addAxis(TextAxis.class);
y.name.set("BBB");
y.valueString.set("333 444");
job.save();
job.startBuild().waitUntilFinished();
MatrixReloadedAction action = job.getLastBuild().action(MatrixReloadedAction.class);
action.open();
action.shouldHaveCombination("AAA=111,BBB=333").shouldHaveCombination("AAA=111,BBB=444").shouldHaveCombination("AAA=222,BBB=333").shouldHaveCombination("AAA=222,BBB=444");
action.rebuild("AAA=111,BBB=333");
MatrixBuild build = (MatrixBuild) job.getLastBuild().shouldSucceed();
assertThat(build.getConfiguration("AAA=111,BBB=333"), exists());
assertThat(build.getConfiguration("AAA=111,BBB=444"), not(exists()));
assertThat(build.getConfiguration("AAA=222,BBB=333"), not(exists()));
assertThat(build.getConfiguration("AAA=222,BBB=444"), not(exists()));
}
use of org.jenkinsci.test.acceptance.po.MatrixProject in project acceptance-test-harness by jenkinsci.
the class JobConfigHistoryPluginTest method track_change_in_matrix_project.
@Test
@Issue("JENKINS-24410")
@WithPlugins("matrix-project")
public void track_change_in_matrix_project() {
MatrixProject job = jenkins.jobs.create(MatrixProject.class);
JobConfigHistory history = job.action(JobConfigHistory.class);
List<Change> original = history.getChanges();
job.configure();
job.runSequentially.check();
job.save();
List<Change> newOnes = history.getChanges();
assertThat("New changes saved", newOnes.size(), greaterThan(original.size()));
}
use of org.jenkinsci.test.acceptance.po.MatrixProject in project acceptance-test-harness by jenkinsci.
the class JavadocPluginTest method publish_javadoc_from_matrix_job.
@Test
@WithPlugins("matrix-project")
public void publish_javadoc_from_matrix_job() {
MatrixProject job = jenkins.jobs.create(MatrixProject.class);
setup(job);
job.startBuild().shouldSucceed();
MatrixConfiguration def = job.getConfiguration("default");
assertThat(def, hasAction(JAVADOC_ACTION));
assertJavadoc(def);
}
use of org.jenkinsci.test.acceptance.po.MatrixProject in project acceptance-test-harness by jenkinsci.
the class ForemanNodeSharingPluginTest method testMatrixJob.
/**
* Test a matrix job
*/
@Test
@WithPlugins("matrix-project")
public void testMatrixJob() {
jenkins.save();
MatrixProject job = jenkins.jobs.create(MatrixProject.class);
job.configure();
LabelExpressionAxis a = job.addAxis(LabelExpressionAxis.class);
a.values.set("label1");
job.addUserAxis("X", "1 2 3 4 5");
job.save();
MatrixBuild b = job.startBuild().as(MatrixBuild.class);
b.waitUntilFinished(EXTENDED_PROVISION_TIMEOUT);
for (MatrixRun config : b.getConfigurations()) {
config.shouldSucceed();
}
}
use of org.jenkinsci.test.acceptance.po.MatrixProject in project acceptance-test-harness by jenkinsci.
the class OpenstackCloudPluginTest method scheduleMatrixWithoutLabel.
@Test
@Issue("JENKINS-29998")
@WithCredentials(credentialType = WithCredentials.SSH_USERNAME_PRIVATE_KEY, values = { MACHINE_USERNAME, "/openstack_plugin/unsafe" })
@TestActivation({ "HARDWARE_ID", "IMAGE_ID", "KEY_PAIR_NAME", "NETWORK_ID" })
@WithPlugins("matrix-project")
public void scheduleMatrixWithoutLabel() {
configureCloudInit("cloud-init");
configureProvisioning("SSH", "label");
jenkins.configure();
jenkins.getConfigPage().numExecutors.set(0);
jenkins.save();
MatrixProject job = jenkins.jobs.create(MatrixProject.class);
job.configure();
job.save();
MatrixBuild pb = job.scheduleBuild().waitUntilFinished(PROVISIONING_TIMEOUT).shouldSucceed().as(MatrixBuild.class);
assertThat(pb.getNode(), equalTo((Node) jenkins));
MatrixRun cb = pb.getConfiguration("default");
assertThat(cb.getNode(), not(equalTo((Node) jenkins)));
}
Aggregations