Search in sources :

Example 1 with BuildTriggerConfig

use of org.jenkinsci.test.acceptance.plugins.parameterized_trigger.BuildTriggerConfig in project acceptance-test-harness by jenkinsci.

the class CheckStylePluginTest method should_return_from_triggered_subjob.

@Test
@WithPlugins("parameterized-trigger")
@Issue("JENKINS-33162")
public void should_return_from_triggered_subjob() {
    FreeStyleJob checkstyleJob = createFreeStyleJob(settings -> settings.pattern.set(PATTERN_WITH_776_WARNINGS));
    FreeStyleJob trigger = jenkins.jobs.create();
    trigger.configure();
    TriggerCallBuildStep step = trigger.addBuildStep(TriggerCallBuildStep.class);
    BuildTriggerConfig config = step.getBuildTriggerConfig(0);
    config.projects.set(checkstyleJob.name);
    config.block.click();
    trigger.save();
    trigger.startBuild().shouldSucceed();
    Build downstream = checkstyleJob.build(1);
    downstream.shouldSucceed();
}
Also used : Build(org.jenkinsci.test.acceptance.po.Build) BuildTriggerConfig(org.jenkinsci.test.acceptance.plugins.parameterized_trigger.BuildTriggerConfig) TriggerCallBuildStep(org.jenkinsci.test.acceptance.plugins.parameterized_trigger.TriggerCallBuildStep) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) Issue(org.jvnet.hudson.test.Issue) Test(org.junit.Test) WithPlugins(org.jenkinsci.test.acceptance.junit.WithPlugins)

Aggregations

WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)1 BuildTriggerConfig (org.jenkinsci.test.acceptance.plugins.parameterized_trigger.BuildTriggerConfig)1 TriggerCallBuildStep (org.jenkinsci.test.acceptance.plugins.parameterized_trigger.TriggerCallBuildStep)1 Build (org.jenkinsci.test.acceptance.po.Build)1 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)1 Test (org.junit.Test)1 Issue (org.jvnet.hudson.test.Issue)1