Search in sources :

Example 6 with SnippetizerTester

use of org.jenkinsci.plugins.workflow.cps.SnippetizerTester in project throttle-concurrent-builds-plugin by jenkinsci.

the class ThrottleStepTest method snippetizer.

@Test
public void snippetizer() throws Exception {
    TestUtil.setupCategories(TestUtil.ONE_PER_NODE);
    SnippetizerTester st = new SnippetizerTester(j);
    st.assertRoundTrip(new ThrottleStep(Collections.singletonList(TestUtil.ONE_PER_NODE.getCategoryName())), "throttle(['" + TestUtil.ONE_PER_NODE.getCategoryName() + "']) {\n    // some block\n}");
}
Also used : ThrottleStep(hudson.plugins.throttleconcurrents.pipeline.ThrottleStep) SnippetizerTester(org.jenkinsci.plugins.workflow.cps.SnippetizerTester) Test(org.junit.Test)

Aggregations

SnippetizerTester (org.jenkinsci.plugins.workflow.cps.SnippetizerTester)6 Test (org.junit.Test)6 ThrottleStep (hudson.plugins.throttleconcurrents.pipeline.ThrottleStep)1 TestResultTest (hudson.tasks.junit.TestResultTest)1 HashMap (java.util.HashMap)1 OnFailure (org.csanchez.jenkins.plugins.kubernetes.pod.retention.OnFailure)1 DynamicPVCWorkspaceVolume (org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.DynamicPVCWorkspaceVolume)1 EmptyDirWorkspaceVolume (org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.EmptyDirWorkspaceVolume)1 CpsFlowDefinition (org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition)1 WorkflowJob (org.jenkinsci.plugins.workflow.job.WorkflowJob)1 WorkflowRun (org.jenkinsci.plugins.workflow.job.WorkflowRun)1 JobPropertyStep (org.jenkinsci.plugins.workflow.multibranch.JobPropertyStep)1 Issue (org.jvnet.hudson.test.Issue)1