Skip to content

Commit 6979c6b

Browse files
committed
Adapt DSLTest.legacyStage to test only the special case
1 parent 05f2741 commit 6979c6b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

plugin/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
<scope>import</scope>
5656
<type>pom</type>
5757
</dependency>
58+
<dependency>
59+
<groupId>org.jenkins-ci.plugins</groupId>
60+
<artifactId>pipeline-stage-step</artifactId>
61+
<version>303.v50e56cdd58d9</version> <!-- TODO https://github.com/jenkinsci/pipeline-stage-step-plugin/pull/94 -->
62+
</dependency>
5863
</dependencies>
5964
</dependencyManagement>
6065
<dependencies>

plugin/src/test/java/org/jenkinsci/plugins/workflow/cps/DSLTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,10 @@ public void namedSoleParamForStep() throws Exception {
600600
p.setDefinition(new CpsFlowDefinition(
601601
"stage(name: 'A');\n" +
602602
"echo('done')", true));
603-
WorkflowRun b = r.assertBuildStatusSuccess(p.scheduleBuild2(0));
603+
WorkflowRun b = r.waitForCompletion(p.scheduleBuild2(0).waitForStart());
604+
r.assertLogContains(org.jenkinsci.plugins.workflow.support.steps.stage.Messages.StageStepExecution_non_block_mode_deprecated(), b);
605+
// Special case in DSL.invokeStep:
606+
r.assertLogNotContains("stage step must be called with a body", b);
604607
}
605608

606609
@Test public void standardStage() throws Exception {

0 commit comments

Comments
 (0)