Skip to content

Commit

Permalink
Obsolete approveSignature calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Sep 16, 2016
1 parent 788eccc commit 5bd5fd8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/test/java/org/jenkinsci/plugins/workflow/DSLTest.java
Expand Up @@ -27,7 +27,6 @@
import hudson.model.Result;
import javax.inject.Inject;

import org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
Expand Down Expand Up @@ -55,7 +54,6 @@ public class DSLTest {
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition("echo 'this came from a step'"));
r.assertLogContains("this came from a step", r.assertBuildStatusSuccess(p.scheduleBuild2(0)));
ScriptApproval.get().approveSignature("method java.lang.String toUpperCase"); // TODO until script-security whitelists this kind of thing by default
p.setDefinition(new CpsFlowDefinition("def echo(s) {println s.toUpperCase()}\necho 'this came from my own function'\nsteps.echo 'but this is still from a step'", true));
WorkflowRun b2 = r.assertBuildStatusSuccess(p.scheduleBuild2(0));
r.assertLogContains("THIS CAME FROM MY OWN FUNCTION", b2);
Expand Down
Expand Up @@ -157,8 +157,6 @@ public void stop(Throwable cause) throws Exception {
"for (int i = 0; i < arr.size(); i++) {def elt = arr[i]; echo \"running C-style loop on ${elt}\"; semaphore \"C-${elt}\"}\n" +
"for (def elt : arr) {echo \"running new-style loop on ${elt}\"; semaphore \"new-${elt}\"}"
, true));
ScriptApproval.get().approveSignature("staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods plus java.util.Collection java.lang.Object"); // TODO ought to be in generic-whitelist
ScriptApproval.get().approveSignature("staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods plus java.util.List java.lang.Object"); // TODO ought to be in generic-whitelist-groovy2
startBuilding();
SemaphoreStep.waitForStart("C-one/1", b);
story.j.waitForMessage("running C-style loop on one", b);
Expand Down

0 comments on commit 5bd5fd8

Please sign in to comment.