diff --git a/pom.xml b/pom.xml index 602a22a..5eb409b 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.3 + 3.2.3 @@ -24,9 +24,9 @@ ${java.release} ${java.release} - 1.9.10 + 1.9.23 4.9.0 - 2.15.2 + 2.17.0 @@ -88,7 +88,7 @@ com.squareup.okhttp3 okhttp - 4.11.0 + 4.12.0 @@ -113,7 +113,7 @@ org.apache.tika tika-core - 2.9.0 + 2.9.1 @@ -136,8 +136,14 @@ org.wiremock - wiremock - 3.0.2 + wiremock-standalone + 3.4.2 + test + + + org.apache.httpcomponents.client5 + httpclient5 + 5.3.1 test diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f01a94c..8ab2189 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -28,4 +28,4 @@ spring: config.activate.on-profile: integration-test application: api-key: my-api-key - allowedOrigins: http://localhost:5000 + allowedOrigins: http://localhost:5050 diff --git a/src/test/kotlin/no/fdk/dataset/preview/service/PreviewContractTest.kt b/src/test/kotlin/no/fdk/dataset/preview/service/PreviewContractTest.kt index 855c9ce..182d7c7 100644 --- a/src/test/kotlin/no/fdk/dataset/preview/service/PreviewContractTest.kt +++ b/src/test/kotlin/no/fdk/dataset/preview/service/PreviewContractTest.kt @@ -30,7 +30,7 @@ class PreviewContractTest : ApiTestContext() { @Test fun `Unauthorized when api token is not included`() { assertThrows { - val previewRequest = PreviewRequest("http://localhost:5000/download", 5) + val previewRequest = PreviewRequest("http://localhost:5050/download", 5) val rsp = authorizedRequest("/preview", port, mapper.writeValueAsString(previewRequest), null, HttpMethod.POST) } @@ -38,7 +38,7 @@ class PreviewContractTest : ApiTestContext() { @Test fun ok_csv() { - val previewRequest = PreviewRequest("http://localhost:5000/download/csv", 5) + val previewRequest = PreviewRequest("http://localhost:5050/download/csv", 5) val rsp = authorizedRequest( "/preview", port, mapper.writeValueAsString(previewRequest), "my-api-key", HttpMethod.POST @@ -53,7 +53,7 @@ class PreviewContractTest : ApiTestContext() { @Test fun ok_csv_zip() { - val previewRequest = PreviewRequest("http://localhost:5000/download/csv-zip", 5) + val previewRequest = PreviewRequest("http://localhost:5050/download/csv-zip", 5) val rsp = authorizedRequest( "/preview", port, mapper.writeValueAsString(previewRequest), "my-api-key", HttpMethod.POST @@ -68,7 +68,7 @@ class PreviewContractTest : ApiTestContext() { @Test fun ok_xlsx_zip() { - val previewRequest = PreviewRequest("http://localhost:5000/download/xlsx-zip", 10) + val previewRequest = PreviewRequest("http://localhost:5050/download/xlsx-zip", 10) val rsp = authorizedRequest( "/preview", port, mapper.writeValueAsString(previewRequest), "my-api-key", HttpMethod.POST @@ -85,7 +85,7 @@ class PreviewContractTest : ApiTestContext() { @Test fun ok_json_zip() { - val previewRequest = PreviewRequest("http://localhost:5000/download/json-zip", 10) + val previewRequest = PreviewRequest("http://localhost:5050/download/json-zip", 10) val rsp = authorizedRequest( "/preview", port, mapper.writeValueAsString(previewRequest), "my-api-key", HttpMethod.POST @@ -104,7 +104,7 @@ class PreviewContractTest : ApiTestContext() { @Test fun `Bad request`() { - val previewRequest = PreviewRequest("http://localhost:5000/download-link-does-not-exist", 5) + val previewRequest = PreviewRequest("http://localhost:5050/download-link-does-not-exist", 5) val rsp = authorizedRequest( "/preview", port, mapper.writeValueAsString(previewRequest), "my-api-key", HttpMethod.POST diff --git a/src/test/kotlin/no/fdk/dataset/preview/service/utils/ContractMock.kt b/src/test/kotlin/no/fdk/dataset/preview/service/utils/ContractMock.kt index 2becf86..acb18bd 100644 --- a/src/test/kotlin/no/fdk/dataset/preview/service/utils/ContractMock.kt +++ b/src/test/kotlin/no/fdk/dataset/preview/service/utils/ContractMock.kt @@ -4,7 +4,7 @@ import com.github.tomakehurst.wiremock.WireMockServer import com.github.tomakehurst.wiremock.client.WireMock.* import org.springframework.beans.factory.ObjectFactory -private val mockserver = WireMockServer(5000) +private val mockserver = WireMockServer(5050) fun startMockServer() { if(!mockserver.isRunning) {