fix(back-end): file error handling
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 1m22s
Build, Test and Deploy / build-and-push (push) Successful in 30s
Build, Test and Deploy / deploy (push) Successful in 6s

This commit is contained in:
2026-02-16 14:34:10 +01:00
parent 881bd87392
commit 304ed942b8
3 changed files with 10 additions and 11 deletions

View File

@@ -66,7 +66,6 @@ public class SlicerService {
// 3. Build Command // 3. Build Command
List<String> command = new ArrayList<>(); List<String> command = new ArrayList<>();
command.add(slicerPath); command.add(slicerPath);
command.add("--headless");
// Output directory // Output directory
command.add("--outputdir"); command.add("--outputdir");

View File

@@ -17,7 +17,7 @@ import com.printcalculator.entity.PrinterMachine;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartFile;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -45,25 +45,25 @@ public class ManualSessionPersistenceTest {
@Autowired @Autowired
private QuoteSessionController controller; private QuoteSessionController controller;
@MockBean @MockitoBean
private QuoteSessionRepository sessionRepo; private QuoteSessionRepository sessionRepo;
@MockBean @MockitoBean
private QuoteLineItemRepository lineItemRepo; // Mock this too private QuoteLineItemRepository lineItemRepo; // Mock this too
@MockBean @MockitoBean
private SlicerService slicerService; private SlicerService slicerService;
@MockBean @MockitoBean
private StorageService storageService; private StorageService storageService;
@MockBean @MockitoBean
private QuoteCalculator quoteCalculator; private QuoteCalculator quoteCalculator;
@MockBean @MockitoBean
private PrinterMachineRepository machineRepo; private PrinterMachineRepository machineRepo;
@MockBean @MockitoBean
private com.printcalculator.repository.PricingPolicyRepository pricingRepo; // Add this if needed by controller private com.printcalculator.repository.PricingPolicyRepository pricingRepo; // Add this if needed by controller
@Test @Test

View File

@@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.*;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.bean.override.mockito.MockitoBean;
import com.printcalculator.service.ClamAVService; import com.printcalculator.service.ClamAVService;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
@@ -48,7 +48,7 @@ import static org.mockito.Mockito.when;
}) })
class OrderIntegrationTest { class OrderIntegrationTest {
@MockBean @MockitoBean
private ClamAVService clamAVService; private ClamAVService clamAVService;
@Autowired @Autowired