22
33import org .apache .commons .compress .archivers .tar .TarArchiveEntry ;
44import org .apache .commons .compress .archivers .tar .TarArchiveInputStream ;
5- import org .apache .commons .lang3 .SystemUtils ;
65import org .junit .Rule ;
76import org .junit .Test ;
87import org .junit .rules .TemporaryFolder ;
2322import static org .junit .Assert .assertEquals ;
2423import static org .junit .Assert .assertNotNull ;
2524import static org .junit .Assert .assertTrue ;
26- import static org .junit .Assume .assumeFalse ;
2725
2826public class CompressArchiveUtilTest {
2927
@@ -71,7 +69,6 @@ public void tarWithExecutableFileAsInput() throws Exception {
7169
7270 @ Test
7371 public void tarWithSymbolicLinkFileAsInput () throws IOException {
74- assumeSymbolicLinksAreUnrestrictedByDefault ();
7572 Path archiveSourceFile = tempFolder .getRoot ().toPath ().resolve ("symlinkFile" );
7673 Path linkTargetFile = tempFolder .newFile ("link-target" ).toPath ();
7774 Files .createSymbolicLink (archiveSourceFile , linkTargetFile );
@@ -142,7 +139,6 @@ public void tarWithfolderAsInputAndNestedExecutableFile() throws Exception {
142139
143140 @ Test
144141 public void tarWithfolderAsInputAndNestedSymbolicLinkFile () throws Exception {
145- assumeSymbolicLinksAreUnrestrictedByDefault ();
146142 Path archiveSourceDir = tempFolder .newFolder ("archive-source" ).toPath ();
147143 Path linkTargetFile = tempFolder .newFile ("link-target" ).toPath ();
148144 Path symlinkFile = archiveSourceDir .resolve ("symlinkFile" );
@@ -164,7 +160,6 @@ public void tarWithfolderAsInputAndNestedSymbolicLinkFile() throws Exception {
164160
165161 @ Test
166162 public void tarWithfolderAsInputAndNestedSymbolicLinkDir () throws Exception {
167- assumeSymbolicLinksAreUnrestrictedByDefault ();
168163 Path archiveSourceDir = tempFolder .newFolder ("archive-source" ).toPath ();
169164 Path linkTargetDir = tempFolder .newFolder ("link-target" ).toPath ();
170165 Path symlinkFile = archiveSourceDir .resolve ("symlinkFile" );
@@ -209,7 +204,6 @@ public void archiveTARFilesWithExecutableFile() throws Exception {
209204
210205 @ Test
211206 public void archiveTARFilesWithSymbolicLinkFile () throws Exception {
212- assumeSymbolicLinksAreUnrestrictedByDefault ();
213207 Path linkTargetFile = tempFolder .newFile ("link-target" ).toPath ();
214208 Path symlinkFile = tempFolder .getRoot ().toPath ().resolve ("symlinkFile" );
215209 Files .createSymbolicLink (symlinkFile , linkTargetFile );
@@ -221,7 +215,6 @@ public void archiveTARFilesWithSymbolicLinkFile() throws Exception {
221215
222216 @ Test
223217 public void archiveTARFilesWithSymbolicLinkDir () throws Exception {
224- assumeSymbolicLinksAreUnrestrictedByDefault ();
225218 Path linkTargetDir = tempFolder .newFolder ("link-target" ).toPath ();
226219 Path symlinkFile = tempFolder .getRoot ().toPath ().resolve ("symlinkFile" );
227220 Files .createSymbolicLink (symlinkFile , linkTargetDir );
@@ -324,8 +317,4 @@ private static int getNumberOfEntryInArchive(File tarArchive) throws IOException
324317 }
325318 return numberOfEntries ;
326319 }
327-
328- private static void assumeSymbolicLinksAreUnrestrictedByDefault (){
329- assumeFalse (SystemUtils .IS_OS_WINDOWS );
330- }
331320}
0 commit comments