diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/repository/CompressedTarFunctionTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/repository/CompressedTarFunctionTest.java | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/repository/CompressedTarFunctionTest.java b/src/test/java/com/google/devtools/build/lib/rules/repository/CompressedTarFunctionTest.java index 35305da87f..b638b21052 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/repository/CompressedTarFunctionTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/repository/CompressedTarFunctionTest.java @@ -54,8 +54,6 @@ public class CompressedTarFunctionTest { private static final String PATH_TO_TEST_ARCHIVE = "/com/google/devtools/build/lib/rules/repository/"; - private static final String ROOT_FOLDER_NAME = "root_folder"; - /* Tarball, created by * tar -czf <ARCHIVE_NAME> <REGULAR_FILE_NAME> <HARD_LINK_FILE_NAME> <SYMBOLIC_LINK_FILE_NAME> */ @@ -88,36 +86,12 @@ public class CompressedTarFunctionTest { } /** - * Test decompressing a tar.gz file with hard link file and symbolic link file inside without - * stripping a prefix - * - * @throws Exception - */ - @Test - public void testDecompressWithoutPrefix() throws Exception { - - Path outputDir = - new CompressedTarFunction() { - @Override - protected InputStream getDecompressorStream(DecompressorDescriptor descriptor) - throws IOException { - return new GZIPInputStream(new FileInputStream(descriptor.archivePath().getPathFile())); - } - }.decompress(descriptorBuilder.build()); - - assertOutputFiles(outputDir.getRelative(ROOT_FOLDER_NAME)); - } - - /** - * Test decompressing a tar.gz file with hard link file and symbolic link file inside and - * stripping a prefix + * Test decompressing a tar.gz file with hard link file and symbolic link file inside * * @throws Exception */ @Test - public void testDecompressWithPrefix() throws Exception { - - descriptorBuilder.setPrefix(ROOT_FOLDER_NAME); + public void testDecompress() throws Exception { Path outputDir = new CompressedTarFunction() { @@ -128,14 +102,6 @@ public class CompressedTarFunctionTest { } }.decompress(descriptorBuilder.build()); - assertOutputFiles(outputDir); - } - - /** - * Validate the content of the output directory - */ - private void assertOutputFiles(Path outputDir) throws Exception { - assertThat(outputDir.exists()).isTrue(); assertThat(outputDir.getRelative(REGULAR_FILE_NAME).exists()).isTrue(); assertThat(outputDir.getRelative(REGULAR_FILE_NAME).getFileSize()).isNotEqualTo(0); |