Skip to content

Commit

Permalink
Merge pull request #133 from it-at-m/maint/dispatch-properties-state-…
Browse files Browse the repository at this point in the history
…tag-typo

maint/dispatch-properties-state-tag-typo
  • Loading branch information
simonhir authored Mar 10, 2025
2 parents 114cbcf + 964860a commit fd0430d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -120,7 +120,7 @@ public Map<String, List<String>> getDispatchExcludeTags() {
*/
public Map<String, List<String>> getProtocolExcludeTags() {
return Map.of(
protocolStateTagKey, List.of(protocolProcessedStateTageValue, errorStateValue));
protocolStateTagKey, List.of(protocolProcessedStateTagValue, errorStateValue));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion dispatch-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit fd0430d

Please sign in to comment.