From 118f0547b5baf5a08cb1dc960e3e9cd885e170f8 Mon Sep 17 00:00:00 2001 From: arus2023 Date: Thu, 5 Oct 2023 10:50:34 -0500 Subject: [PATCH 1/2] Removed 2 unnecessary stubbings in VaultBuildWrapperTest.java --- .../java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java b/src/test/java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java index b8b714ac..5ec8d500 100644 --- a/src/test/java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java +++ b/src/test/java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java @@ -43,7 +43,6 @@ public void testWithNonExistingPath() throws IOException, InterruptedException { PrintStream logger = new PrintStream(baos); SimpleBuildWrapper.Context context = null; Run build = mock(Build.class); - when(build.getParent()).thenReturn(null); EnvVars envVars = mock(EnvVars.class); when(envVars.expand(path)).thenReturn(path); @@ -75,7 +74,6 @@ private List standardSecrets(String path) { private LogicalResponse getNotFoundResponse() { LogicalResponse resp = mock(LogicalResponse.class); RestResponse rest = mock(RestResponse.class); - when(resp.getData()).thenReturn(new HashMap<>()); when(resp.getRestResponse()).thenReturn(rest); when(rest.getStatus()).thenReturn(404); return resp; From 637d5ccc5fb1d9172d20a4d7a660b747c6ead0d3 Mon Sep 17 00:00:00 2001 From: ARUS2023 <145485937+ARUS2023@users.noreply.github.com> Date: Thu, 5 Oct 2023 11:08:55 -0500 Subject: [PATCH 2/2] Update VaultBuildWrapperTest.java Remove unused imports --- .../java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java b/src/test/java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java index 5ec8d500..c1a0c696 100644 --- a/src/test/java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java +++ b/src/test/java/com/datapipe/jenkins/vault/VaultBuildWrapperTest.java @@ -14,7 +14,6 @@ import java.io.PrintStream; import java.nio.charset.StandardCharsets; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import jenkins.tasks.SimpleBuildWrapper; import org.junit.Rule;