From 275e05c0f14f6d6ea4a6669fbff35ee871056c98 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 30 Oct 2024 18:07:03 -0400 Subject: [PATCH] `SerializableSecureGroovyScriptTest` must use `JenkinsRule` --- .../util/SerializableSecureGroovyScriptTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/org/jenkins/plugins/lockableresources/util/SerializableSecureGroovyScriptTest.java b/src/test/java/org/jenkins/plugins/lockableresources/util/SerializableSecureGroovyScriptTest.java index 3b1c4500e..91f6b592b 100644 --- a/src/test/java/org/jenkins/plugins/lockableresources/util/SerializableSecureGroovyScriptTest.java +++ b/src/test/java/org/jenkins/plugins/lockableresources/util/SerializableSecureGroovyScriptTest.java @@ -4,9 +4,15 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript; +import org.junit.Rule; import org.junit.Test; +import org.jvnet.hudson.test.JenkinsRule; public class SerializableSecureGroovyScriptTest { + + @Rule + public JenkinsRule r = new JenkinsRule(); + @Test public void testRehydrate() { SerializableSecureGroovyScript nullCheck = new SerializableSecureGroovyScript(null);