From: Neil Derraugh Date: Fri, 17 Apr 2020 17:35:30 +0000 (-0400) Subject: ZipSlip test fails on Mac OS X-Git-Tag: 1.7.0~232 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F09%2F106209%2F2;p=sdc.git ZipSlip test fails on Mac OS Mac OS has a symlink in the tmp dir that gets created in the test for ZipSlip. Using real paths prevents the test test from failing by using actual paths instead of a potentially different symlinked path to the canonical path. Issue-ID: SDC-2887 Signed-off-by: neil.derraugh Change-Id: Iafb0a84f6ab68276c5782c1ef716c59435aa72f5 --- diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/zip/ZipUtilsTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/zip/ZipUtilsTest.java index d5fb3dcc8b..bfd1046000 100644 --- a/common-app-api/src/test/java/org/openecomp/sdc/common/zip/ZipUtilsTest.java +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/zip/ZipUtilsTest.java @@ -113,8 +113,8 @@ public class ZipUtilsTest { @Test public void testUnzipAndZip() throws IOException, ZipException { - final Path unzipTempPath = Files.createTempDirectory("testUnzip"); - final Path zipTempPath = Files.createTempDirectory("testZip"); + final Path unzipTempPath = Files.createTempDirectory("testUnzip").toRealPath(); + final Path zipTempPath = Files.createTempDirectory("testZip").toRealPath(); final Path testZipPath; try { try {