1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-07-01 14:12:55 +00:00

chore: use API URL to DNPM:DIP

This commit is contained in:
2025-03-20 14:13:21 +01:00
parent f66b737f11
commit 775a7df1ce
2 changed files with 8 additions and 8 deletions

View File

@ -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: * `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/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_USERNAME`: Basic-Auth-Benutzername für bwHC-Backend
* `APP_REST_PASSWORD`: Basic-Auth-Passwort 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** * `APP_REST_IS_BWHC`: `true` für **bwHC Backend**, weglassen oder `false` für **dnpm:dip**

View File

@ -48,7 +48,7 @@ class RestDipMtbFileSenderTest {
@BeforeEach @BeforeEach
fun setup() { fun setup() {
val restTemplate = RestTemplate() 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() val retryTemplate = RetryTemplateBuilder().customPolicy(SimpleRetryPolicy(1)).build()
this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate) this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate)
@ -61,7 +61,7 @@ class RestDipMtbFileSenderTest {
fun shouldReturnExpectedResponseForDelete(requestWithResponse: RequestWithResponse) { fun shouldReturnExpectedResponseForDelete(requestWithResponse: RequestWithResponse) {
this.mockRestServiceServer this.mockRestServiceServer
.expect(method(HttpMethod.DELETE)) .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 { .andRespond {
withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it) withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it)
} }
@ -76,7 +76,7 @@ class RestDipMtbFileSenderTest {
fun shouldReturnExpectedResponseForMtbFilePost(requestWithResponse: RequestWithResponse) { fun shouldReturnExpectedResponseForMtbFilePost(requestWithResponse: RequestWithResponse) {
this.mockRestServiceServer this.mockRestServiceServer
.expect(method(HttpMethod.POST)) .expect(method(HttpMethod.POST))
.andExpect(requestTo("http://localhost:9000/patient-record")) .andExpect(requestTo("http://localhost:9000/api/mtb/etl/patient-record"))
.andRespond { .andRespond {
withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it) withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it)
} }
@ -90,7 +90,7 @@ class RestDipMtbFileSenderTest {
@MethodSource("mtbFileRequestWithResponseSource") @MethodSource("mtbFileRequestWithResponseSource")
fun shouldRetryOnMtbFileHttpRequestError(requestWithResponse: RequestWithResponse) { fun shouldRetryOnMtbFileHttpRequestError(requestWithResponse: RequestWithResponse) {
val restTemplate = RestTemplate() 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() val retryTemplate = RetryTemplateBuilder().customPolicy(SimpleRetryPolicy(3)).build()
this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate) this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate)
@ -105,7 +105,7 @@ class RestDipMtbFileSenderTest {
this.mockRestServiceServer this.mockRestServiceServer
.expect(expectedCount, method(HttpMethod.POST)) .expect(expectedCount, method(HttpMethod.POST))
.andExpect(requestTo("http://localhost:9000/patient-record")) .andExpect(requestTo("http://localhost:9000/api/mtb/etl/patient-record"))
.andRespond { .andRespond {
withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it) withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it)
} }
@ -119,7 +119,7 @@ class RestDipMtbFileSenderTest {
@MethodSource("deleteRequestWithResponseSource") @MethodSource("deleteRequestWithResponseSource")
fun shouldRetryOnDeleteHttpRequestError(requestWithResponse: RequestWithResponse) { fun shouldRetryOnDeleteHttpRequestError(requestWithResponse: RequestWithResponse) {
val restTemplate = RestTemplate() 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() val retryTemplate = RetryTemplateBuilder().customPolicy(SimpleRetryPolicy(3)).build()
this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate) this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate)
@ -134,7 +134,7 @@ class RestDipMtbFileSenderTest {
this.mockRestServiceServer this.mockRestServiceServer
.expect(expectedCount, method(HttpMethod.DELETE)) .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 { .andRespond {
withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it) withStatus(requestWithResponse.httpStatus).body(requestWithResponse.body).createResponse(it)
} }