Skip to content

Commit

Permalink
[JENKINS-41527] Integration test for console.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed May 5, 2017
1 parent 6a27d0a commit 1940694
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/org/jenkinsci/plugins/workflow/job/CLITest.java
Expand Up @@ -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 {
Expand All @@ -58,4 +59,14 @@ public class CLITest {
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.