mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fix for zip unzip test
This commit is contained in:
parent
af49325b88
commit
034c064c25
1 changed files with 5 additions and 9 deletions
|
@ -77,18 +77,14 @@ public class FSGitRepoStoreTest {
|
|||
|
||||
@Test
|
||||
public void zipAndUnzipShouldBeTheSame() throws IOException {
|
||||
long beforeSize = repoStore.totalSize();
|
||||
File expected = new File(original, "proj1");
|
||||
File actual = new File(repoStore.getRootDirectory(), "proj1");
|
||||
assertTrue(Files.contentsAreEqual(expected, actual));
|
||||
InputStream zipped = repoStore.bzip2Project("proj1");
|
||||
repoStore.remove("proj1");
|
||||
assertTrue(beforeSize > repoStore.totalSize());
|
||||
assertFalse(actual.exists());
|
||||
repoStore.unbzip2Project("proj1", zipped);
|
||||
assertEquals(beforeSize, repoStore.totalSize());
|
||||
assertTrue(
|
||||
Files.contentsAreEqual(
|
||||
original,
|
||||
repoStore.getRootDirectory()
|
||||
)
|
||||
);
|
||||
assertTrue(Files.contentsAreEqual(expected, actual));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue