From afecbccea8d4b966b855423c2bdb5771bbfc28f1 Mon Sep 17 00:00:00 2001 From: JordenReuter <149687553+JordenReuter@users.noreply.github.com> Date: Fri, 22 Mar 2024 08:31:14 +0100 Subject: [PATCH] fix: increased max content length to 1,1mb (#9) * fix: increased max content length to 1,1mb * fix: test * fix: test --- src/main/openapi/onecx-welcome-internal-openapi.yaml | 4 ++-- .../internal/controllers/ImageInternalRestControllerTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/openapi/onecx-welcome-internal-openapi.yaml b/src/main/openapi/onecx-welcome-internal-openapi.yaml index 149cac3..b0a532b 100644 --- a/src/main/openapi/onecx-welcome-internal-openapi.yaml +++ b/src/main/openapi/onecx-welcome-internal-openapi.yaml @@ -114,7 +114,7 @@ paths: required: true schema: minimum: 1 - maximum: 110000 + maximum: 1100000 type: integer requestBody: content: @@ -164,7 +164,7 @@ paths: required: true schema: minimum: 1 - maximum: 110000 + maximum: 1100000 type: integer requestBody: content: diff --git a/src/test/java/org/tkit/onecx/welcome/rs/internal/controllers/ImageInternalRestControllerTest.java b/src/test/java/org/tkit/onecx/welcome/rs/internal/controllers/ImageInternalRestControllerTest.java index 1011f7b..cc49c25 100644 --- a/src/test/java/org/tkit/onecx/welcome/rs/internal/controllers/ImageInternalRestControllerTest.java +++ b/src/test/java/org/tkit/onecx/welcome/rs/internal/controllers/ImageInternalRestControllerTest.java @@ -297,7 +297,7 @@ void getAllImageInfosTest() { @Test void testMaxUploadSize() { - byte[] body = new byte[110001]; + byte[] body = new byte[1100001]; new Random().nextBytes(body); var exception = given() @@ -311,7 +311,7 @@ void testMaxUploadSize() { assertThat(exception.getErrorCode()).isEqualTo(CONSTRAINT_VIOLATIONS.name()); assertThat(exception.getDetail()).isEqualTo( - "createImage.contentLength: must be less than or equal to 110000"); + "createImage.contentLength: must be less than or equal to 1100000"); }