use of gov.cms.ab2d.eventlogger.LoggableEvent in project ab2d by CMSgov.
the class FileDeletionServiceTest method deleteUnrelatedTopLevelNdjson.
@DisplayName("Do not delete unrelated top level ndjson file")
@Test
void deleteUnrelatedTopLevelNdjson() throws IOException, URISyntaxException {
// Not connected to a job
Path destination = Paths.get(efsMount, TEST_FILE);
pathsToDelete.add(destination);
Path source = getSourcePath(TEST_FILE);
Files.copy(source, destination, StandardCopyOption.REPLACE_EXISTING);
changeFileCreationDate(destination);
fileDeletionService.deleteFiles();
assertFalse(Files.notExists(destination));
List<LoggableEvent> fileEvents = loggerEventRepository.load(FileEvent.class);
assertEquals(0, fileEvents.size());
checkNoOtherEventsLogged();
}
Aggregations