From 775a7df1ce48c7783daccafa4ae21ca33f1a6961 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Thu, 20 Mar 2025 14:13:21 +0100 Subject: [PATCH] chore: use API URL to DNPM:DIP --- README.md | 2 +- .../processor/output/RestDipMtbFileSenderTest.kt | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f8959be..cc7d10a 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ Folgende Umgebungsvariablen müssen gesetzt sein, damit ein bwHC-MTB-File an das * `APP_REST_URI`: URI der zu benutzenden API der bwHC-Backend-Instanz. Zum Beispiel: * `http://localhost:9000/bwhc/etl/api` für **bwHC Backend** - * `http://localhost:9000/api/mtb/etl` für **dnpm:dip** + * `http://localhost:9000/api` für **dnpm:dip** * `APP_REST_USERNAME`: Basic-Auth-Benutzername für bwHC-Backend * `APP_REST_PASSWORD`: Basic-Auth-Passwort für bwHC-Backend * `APP_REST_IS_BWHC`: `true` für **bwHC Backend**, weglassen oder `false` für **dnpm:dip** diff --git a/src/test/kotlin/dev/dnpm/etl/processor/output/RestDipMtbFileSenderTest.kt b/src/test/kotlin/dev/dnpm/etl/processor/output/RestDipMtbFileSenderTest.kt index e764769..ed8c6f0 100644 --- a/src/test/kotlin/dev/dnpm/etl/processor/output/RestDipMtbFileSenderTest.kt +++ b/src/test/kotlin/dev/dnpm/etl/processor/output/RestDipMtbFileSenderTest.kt @@ -48,7 +48,7 @@ class RestDipMtbFileSenderTest { @BeforeEach fun setup() { val restTemplate = RestTemplate() - val restTargetProperties = RestTargetProperties("http://localhost:9000/", null, null, false) + val restTargetProperties = RestTargetProperties("http://localhost:9000/api", null, null, false) val retryTemplate = RetryTemplateBuilder().customPolicy(SimpleRetryPolicy(1)).build() this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate) @@ -61,7 +61,7 @@ class RestDipMtbFileSenderTest { fun shouldReturnExpectedResponseForDelete(requestWithResponse: RequestWithResponse) { this.mockRestServiceServer .expect(method(HttpMethod.DELETE)) - .andExpect(requestTo("http://localhost:9000/patient/${TEST_PATIENT_PSEUDONYM.value}")) + .andExpect(requestTo("http://localhost:9000/api/mtb/etl/patient/${TEST_PATIENT_PSEUDONYM.value}")) .andRespond { withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it) } @@ -76,7 +76,7 @@ class RestDipMtbFileSenderTest { fun shouldReturnExpectedResponseForMtbFilePost(requestWithResponse: RequestWithResponse) { this.mockRestServiceServer .expect(method(HttpMethod.POST)) - .andExpect(requestTo("http://localhost:9000/patient-record")) + .andExpect(requestTo("http://localhost:9000/api/mtb/etl/patient-record")) .andRespond { withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it) } @@ -90,7 +90,7 @@ class RestDipMtbFileSenderTest { @MethodSource("mtbFileRequestWithResponseSource") fun shouldRetryOnMtbFileHttpRequestError(requestWithResponse: RequestWithResponse) { val restTemplate = RestTemplate() - val restTargetProperties = RestTargetProperties("http://localhost:9000/", null, null, false) + val restTargetProperties = RestTargetProperties("http://localhost:9000/api", null, null, false) val retryTemplate = RetryTemplateBuilder().customPolicy(SimpleRetryPolicy(3)).build() this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate) @@ -105,7 +105,7 @@ class RestDipMtbFileSenderTest { this.mockRestServiceServer .expect(expectedCount, method(HttpMethod.POST)) - .andExpect(requestTo("http://localhost:9000/patient-record")) + .andExpect(requestTo("http://localhost:9000/api/mtb/etl/patient-record")) .andRespond { withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it) } @@ -119,7 +119,7 @@ class RestDipMtbFileSenderTest { @MethodSource("deleteRequestWithResponseSource") fun shouldRetryOnDeleteHttpRequestError(requestWithResponse: RequestWithResponse) { val restTemplate = RestTemplate() - val restTargetProperties = RestTargetProperties("http://localhost:9000/", null, null, false) + val restTargetProperties = RestTargetProperties("http://localhost:9000/api", null, null, false) val retryTemplate = RetryTemplateBuilder().customPolicy(SimpleRetryPolicy(3)).build() this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate) @@ -134,7 +134,7 @@ class RestDipMtbFileSenderTest { this.mockRestServiceServer .expect(expectedCount, method(HttpMethod.DELETE)) - .andExpect(requestTo("http://localhost:9000/patient/${TEST_PATIENT_PSEUDONYM.value}")) + .andExpect(requestTo("http://localhost:9000/api/mtb/etl/patient/${TEST_PATIENT_PSEUDONYM.value}")) .andRespond { withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it) }