diff --git a/kubernetes-client/pom.xml b/kubernetes-client/pom.xml index 581d2a5a33b..4f6326be369 100644 --- a/kubernetes-client/pom.xml +++ b/kubernetes-client/pom.xml @@ -168,6 +168,11 @@ mockito-core test + + org.assertj + assertj-core + test + diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl_CVE2021_20218_Test.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/PodOperationsImpl_CVE2021_20218_Test.java similarity index 91% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl_CVE2021_20218_Test.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/PodOperationsImpl_CVE2021_20218_Test.java index 3ac1489d498..b9e92e2f1ac 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl_CVE2021_20218_Test.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/PodOperationsImpl_CVE2021_20218_Test.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.internal.core.v1; +package io.fabric8.kubernetes.client.dsl.internal; import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.dsl.internal.PodOperationContext; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; +import org.mockito.Mockito; import java.nio.file.Path; @@ -41,7 +41,7 @@ void setUp() { void testWithForgedTar(@TempDir Path targetDirParent) throws Exception { // Given final Path targetDir = targetDirParent.resolve("target"); - final PodOperationsImpl poi = spy(new PodOperationsImpl(baseContext.withDir("/var/source-dir"))); + final PodOperationsImpl poi = Mockito.spy(new PodOperationsImpl(baseContext.withDir("/var/source-dir"))); doReturn(PodOperationsImpl_CVE2021_20218_Test.class.getResourceAsStream("/2021_20218/tar-with-parent-traversal.tar")) .when(poi).readTar("/var/source-dir"); // When diff --git a/pom.xml b/pom.xml index ee4b561c9eb..cf0096f2fd4 100644 --- a/pom.xml +++ b/pom.xml @@ -91,7 +91,7 @@ 3.0.2 - 3.14.0 + 3.19.0 1.2.0.Final 4.0.2 1.5.0 @@ -297,6 +297,13 @@ import pom + + + org.assertj + assertj-core + ${assertj.core.version} + test +