Skip to content

Commit f129830

Browse files
committed
Add test for RunWRapper#getExternalizableId()
1 parent dfdf19b commit f129830

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapperTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,17 @@ public void upstreamBuilds() throws Throwable {
287287
});
288288
}
289289

290+
@Test
291+
@Issue("JENKINS-73421")
292+
public void externalizableId() throws Throwable {
293+
sessions.then(j -> {
294+
WorkflowJob first = j.createProject(WorkflowJob.class, "first-job");
295+
first.setDefinition(new CpsFlowDefinition("echo currentBuild.getExternalizableId()'\n", true));
296+
WorkflowRun firstRun = j.buildAndAssertSuccess(first);
297+
j.assertLogContains(firstRun.getExternalizableId(), firstRun);
298+
});
299+
}
300+
290301
// Like org.hamcrest.text.MatchesPattern.matchesPattern(String) but doing a substring, not whole-string, match:
291302
private static Matcher<String> containsRegexp(final String rx) {
292303
return new SubstringMatcher("containing the regexp", false, rx) {

0 commit comments

Comments
 (0)