Skip to content

Commit 7bbecbb

Browse files
committed
Adjust tests for script security
In jenkinsci#229, I have adjust the source code to take in account the scripty security plugin can now throw a FormException. I only checked it with `mvn compile` and missed that tests were not compiled and had to be adjusted. Tested locally with `mvn verify`
1 parent e6114c5 commit 7bbecbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/org/jenkinsci/plugins/postbuildscript/service/GroovyScriptExecutorFactoryTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import static org.mockito.BDDMockito.given;
77

88
import hudson.model.AbstractBuild;
9+
import hudson.model.Descriptor.FormException;
910
import java.util.Collections;
1011
import org.jenkinsci.plugins.postbuildscript.logging.Logger;
1112
import org.jenkinsci.plugins.postbuildscript.model.Script;
@@ -31,7 +32,7 @@ public class GroovyScriptExecutorFactoryTest {
3132
private GroovyScriptExecutorFactory executorFactory;
3233

3334
@Test
34-
public void createsExecutor() {
35+
public void createsExecutor() throws FormException {
3536

3637
given(script.getContent()).willReturn("scriptContent");
3738
given(script.isSandboxed()).willReturn(true);

0 commit comments

Comments
 (0)