Skip to content

Commit

Permalink
[JENKINS-45110] Remove deprecated syntax and hence duplicated test
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-arabaolaza committed Jun 23, 2017
1 parent 7934776 commit 146348f
Showing 1 changed file with 1 addition and 19 deletions.
Expand Up @@ -96,32 +96,14 @@ public class ConfigFileBuildWrapperWorkflowTest {
});
}

@Test public void symbolWithTargetLocation_Pipeline_short() throws Exception {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition(""
+ "def xsh(file) { if (isUnix()) {sh \"cat $file\"} else {bat \"type $file\"} }\n"
+ "node {\n"
+ " configFileProvider([configFile(fileId: '" + createConfig().id + "', targetLocation: 'myfile.txt')]) {\n"
+ " xsh 'myfile.txt'\n"
+ " }\n"
+ "}", true));
WorkflowRun b = story.j.assertBuildStatusSuccess(p.scheduleBuild2(0));
story.j.assertLogContains("some content", b);
story.j.assertLogNotContains("temporary files", b);
}
});
}

@Test public void symbolWithTargetLocation() throws Exception {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition(""
+ "def xsh(file) { if (isUnix()) {sh \"cat $file\"} else {bat \"type $file\"} }\n"
+ "node {\n"
+ " configFileProvider(managedFiles: [configFile(fileId: '" + createConfig().id + "', targetLocation: 'myfile.txt')]) {\n"
+ " configFileProvider([configFile(fileId: '" + createConfig().id + "', targetLocation: 'myfile.txt')]) {\n"
+ " xsh 'myfile.txt'\n"
+ " }\n"
+ "}", true));
Expand Down

0 comments on commit 146348f

Please sign in to comment.