Image test and variablescontroller tests added

This commit is contained in:
2025-06-11 22:18:56 +02:00
parent 7d070075d6
commit 7c7e82b0e6

View File

@@ -71,16 +71,17 @@ class ArtisanConnectBackendApplicationTests {
@AfterEach @AfterEach
void cleanup() throws IOException { void cleanup() throws IOException {
logger.info("Sprzątanie po teście - usuwanie katalogu testowego: {}", testDirectory); logger.info("Sprzątanie po teście - usuwanie katalogu testowego: {}", testDirectory);
Files.walk(testDirectory) try (var paths = Files.walk(testDirectory)) {
.sorted(Comparator.reverseOrder()) paths.sorted(Comparator.reverseOrder())
.forEach(path -> { .forEach(path -> {
try { try {
Files.delete(path); Files.delete(path);
logger.debug("Usunięto plik: {}", path); logger.debug("Usunięto plik: {}", path);
} catch (IOException e) { } catch (IOException e) {
logger.warn("Nie można usunąć pliku: {}", path, e); logger.warn("Nie można usunąć pliku: {}", path, e);
} }
}); });
}
} }
@Test @Test