From 246b8d36174117a65d864d34e6f43daa0143339a Mon Sep 17 00:00:00 2001 From: Daniel Frick - taafrda7 Date: Wed, 23 Oct 2024 16:49:18 +0200 Subject: [PATCH] #37791 cdr-api no longer requires the version as part of the content type --- README.md | 2 +- src/main/resources/config/application-client.yaml | 2 +- src/main/resources/config/application-dev.yaml | 12 ++++++------ ...adSchedulerAndFileHandlerMultipleConnectorTest.kt | 2 +- .../des/cdr/clientvm/config/CdrClientConfigTest.kt | 2 +- .../clientvm/handler/EventPushFileHandlingTest.kt | 2 +- .../clientvm/handler/PollingPushFileHandlingTest.kt | 2 +- .../des/cdr/clientvm/handler/PullFileHandlingTest.kt | 2 +- .../scheduling/DocumentDownloadSchedulerTest.kt | 2 +- src/test/resources/application-test.yaml | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 833cb8f..50aaf4d 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ client: base-path: api/documents customer: - connector-id: 8000000000000 - content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + content-type: application/forumdatenaustausch+xml;charset=UTF-8 target-folder: /tmp/download/8000000000000 source-folder: /tmp/source/8000000000000 mode: test diff --git a/src/main/resources/config/application-client.yaml b/src/main/resources/config/application-client.yaml index d5950a5..aa8093a 100644 --- a/src/main/resources/config/application-client.yaml +++ b/src/main/resources/config/application-client.yaml @@ -24,7 +24,7 @@ client: customer: # MUST BE SET IN ENVIRONMENT # - connector-id: 1 - # content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + # content-type: application/forumdatenaustausch+xml;charset=UTF-8 # target-folder: /tmp/download # source-folder: /tmp/upload # mode: test|production diff --git a/src/main/resources/config/application-dev.yaml b/src/main/resources/config/application-dev.yaml index f94fc3d..3a81e8d 100644 --- a/src/main/resources/config/application-dev.yaml +++ b/src/main/resources/config/application-dev.yaml @@ -7,32 +7,32 @@ client: base-path: documents customer: - connector-id: 1 - content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + content-type: application/forumdatenaustausch+xml;charset=UTF-8 target-folder: ${cdrClient.targetFolder}/${client.customer[0].connector-id}/test source-folder: ${cdrClient.sourceFolder}/${client.customer[0].connector-id}/test mode: test - connector-id: 1 - content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + content-type: application/forumdatenaustausch+xml;charset=UTF-8 target-folder: ${cdrClient.targetFolder}/${client.customer[1].connector-id} source-folder: ${cdrClient.sourceFolder}/${client.customer[1].connector-id} mode: production - connector-id: 1234 - content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + content-type: application/forumdatenaustausch+xml;charset=UTF-8 target-folder: ${cdrClient.targetFolder}/${client.customer[2].connector-id} source-folder: ${cdrClient.sourceFolder}/${client.customer[2].connector-id} mode: test - connector-id: 5 - content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + content-type: application/forumdatenaustausch+xml;charset=UTF-8 target-folder: ${cdrClient.targetFolder}/${client.customer[3].connector-id} source-folder: ${cdrClient.sourceFolder}/${client.customer[3].connector-id} mode: test - connector-id: 666 - content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + content-type: application/forumdatenaustausch+xml;charset=UTF-8 target-folder: ${cdrClient.targetFolder}/${client.customer[4].connector-id} source-folder: ${cdrClient.sourceFolder}/${client.customer[4].connector-id} mode: production - connector-id: 2345 - content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + content-type: application/forumdatenaustausch+xml;charset=UTF-8 target-folder: ${cdrClient.targetFolder}/${client.customer[5].connector-id} source-folder: ${cdrClient.sourceFolder}/${client.customer[5].connector-id} mode: production diff --git a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/PullDocumentDownloadSchedulerAndFileHandlerMultipleConnectorTest.kt b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/PullDocumentDownloadSchedulerAndFileHandlerMultipleConnectorTest.kt index bbda92b..3e6df07 100644 --- a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/PullDocumentDownloadSchedulerAndFileHandlerMultipleConnectorTest.kt +++ b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/PullDocumentDownloadSchedulerAndFileHandlerMultipleConnectorTest.kt @@ -76,7 +76,7 @@ internal class PullDocumentDownloadSchedulerAndFileHandlerMultipleConnectorTest private val connectorId1 = "1234" private val connectorId2 = "3456" - private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5") + private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8") @BeforeEach fun setup() { diff --git a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/config/CdrClientConfigTest.kt b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/config/CdrClientConfigTest.kt index 71a791d..3a8435b 100644 --- a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/config/CdrClientConfigTest.kt +++ b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/config/CdrClientConfigTest.kt @@ -276,7 +276,7 @@ class CdrClientConfigTest { const val FUNCTION_KEY = "functionKey123" @JvmStatic - val FORUM_DATENAUSTAUSCH_MEDIA_TYPE = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5") + val FORUM_DATENAUSTAUSCH_MEDIA_TYPE = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8") } diff --git a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/EventPushFileHandlingTest.kt b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/EventPushFileHandlingTest.kt index 7140a3d..ef92321 100644 --- a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/EventPushFileHandlingTest.kt +++ b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/EventPushFileHandlingTest.kt @@ -64,7 +64,7 @@ internal class EventPushFileHandlingTest { private val targetDirectory = "customer" private val sourceDirectory = "source" - private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5") + private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8") private lateinit var cdrServiceMock: MockWebServer diff --git a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/PollingPushFileHandlingTest.kt b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/PollingPushFileHandlingTest.kt index cd82bd0..cec79b1 100644 --- a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/PollingPushFileHandlingTest.kt +++ b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/PollingPushFileHandlingTest.kt @@ -57,7 +57,7 @@ internal class PollingPushFileHandlingTest { private val inflightFolder = "inflight" private val targetDirectory = "customer" private val sourceDirectory = "source" - private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5") + private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8") private lateinit var cdrServiceMock: MockWebServer diff --git a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/PullFileHandlingTest.kt b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/PullFileHandlingTest.kt index 605f9d6..6ebd077 100644 --- a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/PullFileHandlingTest.kt +++ b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/handler/PullFileHandlingTest.kt @@ -204,7 +204,7 @@ internal class PullFileHandlingTest { connectorId = connectorId, targetFolder = targetFolder, sourceFolder = sourceFolder, - contentType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5"), + contentType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8"), mode = CdrClientConfig.Mode.PRODUCTION ) diff --git a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/scheduling/DocumentDownloadSchedulerTest.kt b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/scheduling/DocumentDownloadSchedulerTest.kt index b964950..ac746cb 100644 --- a/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/scheduling/DocumentDownloadSchedulerTest.kt +++ b/src/test/kotlin/com/swisscom/health/des/cdr/clientvm/scheduling/DocumentDownloadSchedulerTest.kt @@ -62,7 +62,7 @@ internal class DocumentDownloadSchedulerTest { connectorId = "1234", targetFolder = targetDir, sourceFolder = sourceDir, - contentType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5"), + contentType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8"), mode = CdrClientConfig.Mode.TEST ) every { config.customer } returns listOf(connector) diff --git a/src/test/resources/application-test.yaml b/src/test/resources/application-test.yaml index 343ba11..a70f866 100644 --- a/src/test/resources/application-test.yaml +++ b/src/test/resources/application-test.yaml @@ -21,7 +21,7 @@ client: base-path: documents customer: - connector-id: 1 - content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5 + content-type: application/forumdatenaustausch+xml;charset=UTF-8 target-folder: ${java.io.tmpdir} source-folder: ${java.io.tmpdir}/cdr-client-test-source # If you change this, then you need to change com.swisscom.health.des.cdr.clientvm.AlwaysSameTempDirFactory as well mode: test