@Test @FixFor( "MODE-2440" ) public void shouldBackupRepositoryWhichIncludesBinaryValuesCompressed() throws Exception { loadBinaryContent(); makeBackup(BackupOptions.DEFAULT); wipeRepository(); restoreBackup(); verifyBinaryContent(); }
@Test @FixFor( "MODE-2559" ) public void shouldBackupRepositoryWhichIncludesBinaryValuesUncompressed() throws Exception { BackupOptions backupOptions = new BackupOptions() { @Override public boolean compress() { return false; } }; loadBinaryContent(); makeBackup(backupOptions); wipeRepository(); restoreBackup(); verifyBinaryContent(); }
@Test @FixFor( "MODE-2584" ) public void shouldPreserveBinariesFromRestoredBackup() throws Exception { loadBinaryContent(); makeBackup(BackupOptions.DEFAULT); wipeRepository(); restoreBackup(); makeBackup(BackupOptions.DEFAULT); wipeRepository(); restoreBackup(); verifyBinaryContent(); }
@Test @FixFor( "MODE-2440" ) public void shouldRestoreBinaryReferencesWhenExcludedFromBackup() throws Exception { loadBinaryContent(); verifyBinaryContent(); // Make the backup, and check that there are no problems ... BackupOptions backupOptions = new BackupOptions() { @Override public boolean includeBinaries() { return false; } }; Problems problems = session().getWorkspace().getRepositoryManager().backupRepository(backupDirectory, backupOptions); assertNoProblems(problems); // shutdown the repo and remove just the repo main store (not the binary store) assertTrue(repository().shutdown().get()); FileUtil.delete(backupRepoDir.getPath() + "/store"); // start a fresh empty repo and then restore just the data without binaries startRepositoryWithConfigurationFrom("config/backup-repo-config.json"); RestoreOptions restoreOptions = new RestoreOptions() { @Override public boolean includeBinaries() { return false; } }; problems = session().getWorkspace().getRepositoryManager().restoreRepository(backupDirectory, restoreOptions); assertNoProblems(problems); verifyBinaryContent(); }