From 964860a9e7f1379baeecb083189f6a737dfdaab0 Mon Sep 17 00:00:00 2001 From: Simon Hirtreiter Date: Thu, 6 Mar 2025 16:10:30 +0100 Subject: [PATCH] :pencil2: dispatch property protocolProcessedStateTageValue fix typo --- .../application/usecase/ProtocolProcessingUseCase.java | 2 +- .../dispatcher/configuration/SwimDispatcherProperties.java | 4 ++-- dispatch-service/src/main/resources/application.yml | 2 +- .../application/usecase/ProtocolProcessingUseCaseTest.java | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dispatch-service/src/main/java/de/muenchen/oss/swim/dispatcher/application/usecase/ProtocolProcessingUseCase.java b/dispatch-service/src/main/java/de/muenchen/oss/swim/dispatcher/application/usecase/ProtocolProcessingUseCase.java index 37ad7b71..23aef1ed 100644 --- a/dispatch-service/src/main/java/de/muenchen/oss/swim/dispatcher/application/usecase/ProtocolProcessingUseCase.java +++ b/dispatch-service/src/main/java/de/muenchen/oss/swim/dispatcher/application/usecase/ProtocolProcessingUseCase.java @@ -118,7 +118,7 @@ protected void processProtocolFile(final UseCase useCase, final File file) { matchState = "correct"; } fileSystemOutPort.tagFile(file.bucket(), file.path(), Map.of( - swimDispatcherProperties.getProtocolStateTagKey(), swimDispatcherProperties.getProtocolProcessedStateTageValue(), + swimDispatcherProperties.getProtocolStateTagKey(), swimDispatcherProperties.getProtocolProcessedStateTagValue(), swimDispatcherProperties.getProtocolMatchTagKey(), matchState)); // move protocol final String destPath = useCase.getFinishedProtocolPath(swimDispatcherProperties, file.path()); diff --git a/dispatch-service/src/main/java/de/muenchen/oss/swim/dispatcher/configuration/SwimDispatcherProperties.java b/dispatch-service/src/main/java/de/muenchen/oss/swim/dispatcher/configuration/SwimDispatcherProperties.java index f4e281d2..2de537b7 100644 --- a/dispatch-service/src/main/java/de/muenchen/oss/swim/dispatcher/configuration/SwimDispatcherProperties.java +++ b/dispatch-service/src/main/java/de/muenchen/oss/swim/dispatcher/configuration/SwimDispatcherProperties.java @@ -61,7 +61,7 @@ public class SwimDispatcherProperties { * Tag value for protocol finished processing. */ @NotBlank - private String protocolProcessedStateTageValue; + private String protocolProcessedStateTagValue; /** * Tag value for error occurred. */ @@ -120,7 +120,7 @@ public Map> getDispatchExcludeTags() { */ public Map> getProtocolExcludeTags() { return Map.of( - protocolStateTagKey, List.of(protocolProcessedStateTageValue, errorStateValue)); + protocolStateTagKey, List.of(protocolProcessedStateTagValue, errorStateValue)); } /** diff --git a/dispatch-service/src/main/resources/application.yml b/dispatch-service/src/main/resources/application.yml index 90e6f55c..e6e18c3a 100644 --- a/dispatch-service/src/main/resources/application.yml +++ b/dispatch-service/src/main/resources/application.yml @@ -97,6 +97,6 @@ swim: dispatch-action-tag-key: SWIM_Action protocol-state-tag-key: CSV_State protocol-match-tag-key: CSV_Match - protocol-processed-state-tage-value: finished + protocol-processed-state-tag-value: finished error-class-tag-key: errorClass error-message-tag-key: errorMessage diff --git a/dispatch-service/src/test/java/de/muenchen/oss/swim/dispatcher/application/usecase/ProtocolProcessingUseCaseTest.java b/dispatch-service/src/test/java/de/muenchen/oss/swim/dispatcher/application/usecase/ProtocolProcessingUseCaseTest.java index 96fd0b68..94849baf 100644 --- a/dispatch-service/src/test/java/de/muenchen/oss/swim/dispatcher/application/usecase/ProtocolProcessingUseCaseTest.java +++ b/dispatch-service/src/test/java/de/muenchen/oss/swim/dispatcher/application/usecase/ProtocolProcessingUseCaseTest.java @@ -105,7 +105,7 @@ void testProcessProtocolFile_Successful() { verify(storeProtocolOutPort, times(1)).deleteProtocol(eq(USE_CASE), eq(PROTOCOL_RAW_PATH)); verify(storeProtocolOutPort, times(1)).storeProtocol(eq(USE_CASE), eq(PROTOCOL_RAW_PATH), eq(List.of(PROTOCOL_ENTRY1, PROTOCOL_ENTRY2))); verify(fileSystemOutPort, times(1)).tagFile(eq(PROTOCOL_FILE.bucket()), eq(PROTOCOL_FILE.path()), eq(Map.of( - swimDispatcherProperties.getProtocolStateTagKey(), swimDispatcherProperties.getProtocolProcessedStateTageValue(), + swimDispatcherProperties.getProtocolStateTagKey(), swimDispatcherProperties.getProtocolProcessedStateTagValue(), swimDispatcherProperties.getProtocolMatchTagKey(), "correct"))); verify(fileSystemOutPort, times(1)).moveFile(eq(BUCKET), eq(PROTOCOL_FILE.path()), eq("test/finishedProtocols/path/path.csv")); verify(fileHandlingHelper, times(0)).markFileError(any(), any(), any()); @@ -132,7 +132,7 @@ void testProcessProtocolFile_Missmatch() { verify(notificationOutPort, times(1)).sendProtocol(eq(USE_CASE_RECIPIENTS), eq(USE_CASE), eq(PROTOCOL_RAW_PATH), eq(protocolStream), eq(List.of("test4.pdf")), eq(List.of("test3.pdf"))); verify(fileSystemOutPort, times(1)).tagFile(eq(PROTOCOL_FILE.bucket()), eq(PROTOCOL_FILE.path()), eq(Map.of( - swimDispatcherProperties.getProtocolStateTagKey(), swimDispatcherProperties.getProtocolProcessedStateTageValue(), + swimDispatcherProperties.getProtocolStateTagKey(), swimDispatcherProperties.getProtocolProcessedStateTagValue(), swimDispatcherProperties.getProtocolMatchTagKey(), "missingInProtocolAndFiles"))); verify(fileHandlingHelper, times(0)).markFileError(any(), any(), any()); verify(notificationOutPort, times(0)).sendProtocolError(any(), any(), any(), any());