Skip to content
Permalink
Browse files

[JENKINS-41527] Integration test for console.

  • Loading branch information...
jglick committed May 5, 2017
1 parent 6a27d0a commit 194069478b30128a5e1fee94cde701a6699cc76b
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/test/java/org/jenkinsci/plugins/workflow/job/CLITest.java
@@ -32,6 +32,7 @@
import static org.junit.Assert.*;
import org.junit.Rule;
import org.jvnet.hudson.test.BuildWatcher;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;

public class CLITest {
@@ -58,4 +59,14 @@
assertThat(res.stdout(), containsString("alice\thello"));
}

@Issue("JENKINS-41527")
@Test public void console() throws Exception {
WorkflowJob p = r.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition("echo 'this is what I said'", true));
r.buildAndAssertSuccess(p);
CLICommandInvoker.Result res = new CLICommandInvoker(r, "console").invokeWithArgs("p");
assertThat(res, CLICommandInvoker.Matcher.succeeded());
assertThat(res.stdout(), containsString("this is what I said"));
}

}

0 comments on commit 1940694

Please sign in to comment.
You can’t perform that action at this time.