mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 08:03:42 -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
|
@Test
|
||||||
public void zipAndUnzipShouldBeTheSame() throws IOException {
|
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");
|
InputStream zipped = repoStore.bzip2Project("proj1");
|
||||||
repoStore.remove("proj1");
|
repoStore.remove("proj1");
|
||||||
assertTrue(beforeSize > repoStore.totalSize());
|
assertFalse(actual.exists());
|
||||||
repoStore.unbzip2Project("proj1", zipped);
|
repoStore.unbzip2Project("proj1", zipped);
|
||||||
assertEquals(beforeSize, repoStore.totalSize());
|
assertTrue(Files.contentsAreEqual(expected, actual));
|
||||||
assertTrue(
|
|
||||||
Files.contentsAreEqual(
|
|
||||||
original,
|
|
||||||
repoStore.getRootDirectory()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue