Search in sources :

Example 1 with LabelExpressionAxis

use of org.jenkinsci.test.acceptance.po.LabelExpressionAxis 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();
    }
}
Also used : MatrixRun(org.jenkinsci.test.acceptance.po.MatrixRun) LabelExpressionAxis(org.jenkinsci.test.acceptance.po.LabelExpressionAxis) MatrixProject(org.jenkinsci.test.acceptance.po.MatrixProject) MatrixBuild(org.jenkinsci.test.acceptance.po.MatrixBuild) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) DockerTest(org.jenkinsci.test.acceptance.junit.DockerTest) WithPlugins(org.jenkinsci.test.acceptance.junit.WithPlugins)

Aggregations

AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 DockerTest (org.jenkinsci.test.acceptance.junit.DockerTest)1 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)1 LabelExpressionAxis (org.jenkinsci.test.acceptance.po.LabelExpressionAxis)1 MatrixBuild (org.jenkinsci.test.acceptance.po.MatrixBuild)1 MatrixProject (org.jenkinsci.test.acceptance.po.MatrixProject)1 MatrixRun (org.jenkinsci.test.acceptance.po.MatrixRun)1 Test (org.junit.Test)1