diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4cd036..450533b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,4 +20,5 @@ jobs: uses: onecx/ci-quarkus/.github/workflows/build.yml@v1 secrets: inherit with: - helmEventTargetRepository: onecx/onecx-theme \ No newline at end of file + helmEventTargetRepository: onecx/onecx-help + diff --git a/.github/workflows/create-new-build.yml b/.github/workflows/create-new-build.yml new file mode 100644 index 0000000..1404492 --- /dev/null +++ b/.github/workflows/create-new-build.yml @@ -0,0 +1,9 @@ +name: Create new build + +on: + workflow_dispatch: + +jobs: + build: + uses: onecx/ci-common/.github/workflows/create-new-build.yml@v1 + secrets: inherit diff --git a/pom.xml b/pom.xml index 074051b..922ae0f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - io.github.onecx + org.tkit.onecx onecx-quarkus3-parent - 0.25.0 + 0.31.0 onecx-help-bff @@ -25,10 +25,6 @@ io.quarkus quarkus-resteasy-reactive-jackson - - io.quarkus - quarkus-smallrye-health - io.quarkiverse.openapi.generator quarkus-openapi-generator @@ -56,7 +52,7 @@ org.tkit.quarkus.lib - tkit-quarkus-jpa + tkit-quarkus-rest-context org.mapstruct @@ -78,6 +74,18 @@ io.quarkus quarkus-micrometer-registry-prometheus + + io.quarkus + quarkus-oidc + + + io.quarkus + quarkus-oidc-client + + + io.quarkus + quarkus-oidc-client-reactive-filter + io.quarkiverse.mockserver @@ -117,8 +125,8 @@ src/main/openapi/openapi-help-bff.yaml - gen.io.github.onecx.help.bff.rs.internal - gen.io.github.onecx.help.bff.rs.internal.model + gen.org.tkit.onecx.help.bff.rs.internal + gen.org.tkit.onecx.help.bff.rs.internal.model diff --git a/src/main/helm/Chart.yaml b/src/main/helm/Chart.yaml index b442105..0d46f24 100644 --- a/src/main/helm/Chart.yaml +++ b/src/main/helm/Chart.yaml @@ -1,13 +1,13 @@ apiVersion: v2 -name: onecx-helm-bff +name: onecx-help-bff version: 0.0.0 appVersion: 0.0.0 -description: Onecx helm bff +description: Onecx help bff keywords: - iam - parameters sources: - - https://github.com/onecx/onecx-helm-bff + - https://github.com/onecx/onecx-help-bff maintainers: - name: Tkit Developer email: tkit_dev@1000kit.org diff --git a/src/main/helm/values.yaml b/src/main/helm/values.yaml index 02bc384..2c67597 100644 --- a/src/main/helm/values.yaml +++ b/src/main/helm/values.yaml @@ -1,6 +1,4 @@ app: + name: bff image: - repository: "onecx/onecx-announcement-bff" - tag: 999-SNAPSHOT - db: - enabled: true \ No newline at end of file + repository: "onecx/onecx-help-bff" diff --git a/src/main/java/io/github/onecx/help/bff/rs/controller/HelpRestController.java b/src/main/java/org/tkit/onecx/help/bff/rs/controller/HelpRestController.java similarity index 70% rename from src/main/java/io/github/onecx/help/bff/rs/controller/HelpRestController.java rename to src/main/java/org/tkit/onecx/help/bff/rs/controller/HelpRestController.java index 7d8778b..8e23ff8 100644 --- a/src/main/java/io/github/onecx/help/bff/rs/controller/HelpRestController.java +++ b/src/main/java/org/tkit/onecx/help/bff/rs/controller/HelpRestController.java @@ -1,4 +1,4 @@ -package io.github.onecx.help.bff.rs.controller; +package org.tkit.onecx.help.bff.rs.controller; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; @@ -10,18 +10,18 @@ import org.eclipse.microprofile.rest.client.inject.RestClient; import org.jboss.resteasy.reactive.RestResponse; import org.jboss.resteasy.reactive.server.ServerExceptionMapper; +import org.tkit.onecx.help.bff.rs.mappers.ExceptionMapper; +import org.tkit.onecx.help.bff.rs.mappers.HelpMapper; +import org.tkit.onecx.help.bff.rs.mappers.ProblemDetailMapper; import org.tkit.quarkus.log.cdi.LogService; -import gen.io.github.onecx.help.bff.clients.api.HelpsInternalApi; -import gen.io.github.onecx.help.bff.clients.model.Help; -import gen.io.github.onecx.help.bff.clients.model.HelpAppIds; -import gen.io.github.onecx.help.bff.clients.model.HelpPageResult; -import gen.io.github.onecx.help.bff.clients.model.ProblemDetailResponse; -import gen.io.github.onecx.help.bff.rs.internal.HelpsInternalApiService; -import gen.io.github.onecx.help.bff.rs.internal.model.*; -import io.github.onecx.help.bff.rs.mappers.ExceptionMapper; -import io.github.onecx.help.bff.rs.mappers.HelpMapper; -import io.github.onecx.help.bff.rs.mappers.ProblemDetailMapper; +import gen.org.tkit.onecx.help.bff.clients.api.HelpsInternalApi; +import gen.org.tkit.onecx.help.bff.clients.model.Help; +import gen.org.tkit.onecx.help.bff.clients.model.HelpAppIds; +import gen.org.tkit.onecx.help.bff.clients.model.HelpPageResult; +import gen.org.tkit.onecx.help.bff.clients.model.ProblemDetailResponse; +import gen.org.tkit.onecx.help.bff.rs.internal.HelpsInternalApiService; +import gen.org.tkit.onecx.help.bff.rs.internal.model.*; @ApplicationScoped @Transactional(value = Transactional.TxType.NOT_SUPPORTED) @@ -78,24 +78,6 @@ public Response getHelpById(String id) { } } - @Override - public Response getHelpByItemId(String itemId) { - try (Response response = client.getHelpByItemId(itemId)) { - Help help = response.readEntity(Help.class); - HelpDTO helpDTO = helpMapper.mapHelp(help); - return Response.status(response.getStatus()).entity(helpDTO).build(); - } - } - - @Override - public Response getHelps(Integer pageNumber, Integer pageSize) { - try (Response response = client.getHelps(pageNumber, pageSize)) { - HelpPageResult helpPageResult = response.readEntity(HelpPageResult.class); - HelpPageResultDTO helpPageResultDTO = helpMapper.mapHelpPageResults(helpPageResult); - return Response.status(response.getStatus()).entity(helpPageResultDTO).build(); - } - } - @Override public Response searchHelps(HelpSearchCriteriaDTO helpSearchCriteriaDTO) { @@ -118,13 +100,11 @@ public Response updateHelp(String id, UpdateHelpDTO updateHelpDTO) { @ServerExceptionMapper public RestResponse constraint(ConstraintViolationException ex) { - return exceptionMapper.constraint(ex); } @ServerExceptionMapper public Response restException(WebApplicationException ex) { - return Response.status(ex.getResponse().getStatus()).build(); } } diff --git a/src/main/java/org/tkit/onecx/help/bff/rs/log/BffLogParam.java b/src/main/java/org/tkit/onecx/help/bff/rs/log/BffLogParam.java new file mode 100644 index 0000000..7e98575 --- /dev/null +++ b/src/main/java/org/tkit/onecx/help/bff/rs/log/BffLogParam.java @@ -0,0 +1,32 @@ +package org.tkit.onecx.help.bff.rs.log; + +import java.util.List; + +import jakarta.enterprise.context.ApplicationScoped; + +import org.tkit.quarkus.log.cdi.LogParam; + +import gen.org.tkit.onecx.help.bff.rs.internal.model.*; + +@ApplicationScoped +public class BffLogParam implements LogParam { + + @Override + public List getClasses() { + return List.of( + item(10, CreateHelpDTO.class, x -> { + CreateHelpDTO d = (CreateHelpDTO) x; + return CreateHelpDTO.class.getSimpleName() + "[" + d.getAppId() + "," + d.getItemId() + "]"; + }), + item(10, UpdateHelpDTO.class, x -> { + UpdateHelpDTO d = (UpdateHelpDTO) x; + return UpdateHelpDTO.class.getSimpleName() + "[" + d.getAppId() + "," + d.getItemId() + "]"; + }), + item(10, HelpSearchCriteriaDTO.class, x -> { + HelpSearchCriteriaDTO d = (HelpSearchCriteriaDTO) x; + return HelpSearchCriteriaDTO.class.getSimpleName() + "[" + d.getPageNumber() + "," + + d.getPageSize() + + "]"; + })); + } +} diff --git a/src/main/java/io/github/onecx/help/bff/rs/mappers/ExceptionMapper.java b/src/main/java/org/tkit/onecx/help/bff/rs/mappers/ExceptionMapper.java similarity index 87% rename from src/main/java/io/github/onecx/help/bff/rs/mappers/ExceptionMapper.java rename to src/main/java/org/tkit/onecx/help/bff/rs/mappers/ExceptionMapper.java index 8b73b4f..880a0a3 100644 --- a/src/main/java/io/github/onecx/help/bff/rs/mappers/ExceptionMapper.java +++ b/src/main/java/org/tkit/onecx/help/bff/rs/mappers/ExceptionMapper.java @@ -1,4 +1,4 @@ -package io.github.onecx.help.bff.rs.mappers; +package org.tkit.onecx.help.bff.rs.mappers; import java.util.List; import java.util.Map; @@ -14,9 +14,9 @@ import org.mapstruct.Mapping; import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper; -import gen.io.github.onecx.help.bff.rs.internal.model.ProblemDetailInvalidParamDTO; -import gen.io.github.onecx.help.bff.rs.internal.model.ProblemDetailParamDTO; -import gen.io.github.onecx.help.bff.rs.internal.model.ProblemDetailResponseDTO; +import gen.org.tkit.onecx.help.bff.rs.internal.model.ProblemDetailInvalidParamDTO; +import gen.org.tkit.onecx.help.bff.rs.internal.model.ProblemDetailParamDTO; +import gen.org.tkit.onecx.help.bff.rs.internal.model.ProblemDetailResponseDTO; @Mapper(uses = { OffsetDateTimeMapper.class }) public interface ExceptionMapper { diff --git a/src/main/java/io/github/onecx/help/bff/rs/mappers/HelpMapper.java b/src/main/java/org/tkit/onecx/help/bff/rs/mappers/HelpMapper.java similarity index 81% rename from src/main/java/io/github/onecx/help/bff/rs/mappers/HelpMapper.java rename to src/main/java/org/tkit/onecx/help/bff/rs/mappers/HelpMapper.java index 5ec2b2d..b762c80 100644 --- a/src/main/java/io/github/onecx/help/bff/rs/mappers/HelpMapper.java +++ b/src/main/java/org/tkit/onecx/help/bff/rs/mappers/HelpMapper.java @@ -1,11 +1,11 @@ -package io.github.onecx.help.bff.rs.mappers; +package org.tkit.onecx.help.bff.rs.mappers; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper; -import gen.io.github.onecx.help.bff.clients.model.*; -import gen.io.github.onecx.help.bff.rs.internal.model.*; +import gen.org.tkit.onecx.help.bff.clients.model.*; +import gen.org.tkit.onecx.help.bff.rs.internal.model.*; @Mapper(uses = { OffsetDateTimeMapper.class }) public interface HelpMapper { diff --git a/src/main/java/io/github/onecx/help/bff/rs/mappers/ProblemDetailMapper.java b/src/main/java/org/tkit/onecx/help/bff/rs/mappers/ProblemDetailMapper.java similarity index 67% rename from src/main/java/io/github/onecx/help/bff/rs/mappers/ProblemDetailMapper.java rename to src/main/java/org/tkit/onecx/help/bff/rs/mappers/ProblemDetailMapper.java index 70db1bc..949d8fd 100644 --- a/src/main/java/io/github/onecx/help/bff/rs/mappers/ProblemDetailMapper.java +++ b/src/main/java/org/tkit/onecx/help/bff/rs/mappers/ProblemDetailMapper.java @@ -1,11 +1,11 @@ -package io.github.onecx.help.bff.rs.mappers; +package org.tkit.onecx.help.bff.rs.mappers; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper; -import gen.io.github.onecx.help.bff.clients.model.ProblemDetailResponse; -import gen.io.github.onecx.help.bff.rs.internal.model.ProblemDetailResponseDTO; +import gen.org.tkit.onecx.help.bff.clients.model.ProblemDetailResponse; +import gen.org.tkit.onecx.help.bff.rs.internal.model.ProblemDetailResponseDTO; @Mapper(uses = { OffsetDateTimeMapper.class }) public interface ProblemDetailMapper { diff --git a/src/main/openapi/openapi-help-bff.yaml b/src/main/openapi/openapi-help-bff.yaml index deb9605..47a2a65 100644 --- a/src/main/openapi/openapi-help-bff.yaml +++ b/src/main/openapi/openapi-help-bff.yaml @@ -9,34 +9,6 @@ tags: - name: helpsInternal paths: /helps: - get: - tags: - - helpsInternal - description: Return list of helps - operationId: getHelps - parameters: - - name: pageNumber - in: query - schema: - format: int32 - description: The number of page. - default: 0 - type: integer - - name: pageSize - in: query - schema: - format: int32 - description: The size of page - default: 10 - type: integer - responses: - "200": - description: OK - content: - application/json: - schema: - items: - $ref: '#/components/schemas/HelpPageResult' post: tags: - helpsInternal @@ -162,27 +134,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HelpPageResult' - /helps/itemId/{itemId}: - get: - tags: - - helpsInternal - description: Load a single help definition - operationId: getHelpByItemId - parameters: - - name: itemId - in: path - required: true - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Help' - "404": - description: Not found components: schemas: HelpSearchCriteria: @@ -233,7 +184,7 @@ components: - itemId type: object properties: - version: + modificationCount: format: int32 type: integer creationDate: @@ -294,19 +245,6 @@ components: - itemId type: object properties: - version: - format: int32 - type: integer - creationDate: - $ref: '#/components/schemas/OffsetDateTime' - creationUser: - type: string - modificationDate: - $ref: '#/components/schemas/OffsetDateTime' - modificationUser: - type: string - id: - type: string itemId: type: string context: @@ -320,19 +258,13 @@ components: UpdateHelp: required: - name + - itemId + - modificationCount type: object properties: - version: + modificationCount: format: int32 type: integer - creationDate: - $ref: '#/components/schemas/OffsetDateTime' - creationUser: - type: string - modificationDate: - $ref: '#/components/schemas/OffsetDateTime' - modificationUser: - type: string id: type: string itemId: diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 265696d..a1dfca2 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,21 +1,32 @@ # PROD %prod.quarkus.rest-client.onecx_help_svc.url=http://onecx-help-svc:8080 +# propagate the apm-principal-token from requests we receive +org.eclipse.microprofile.rest.client.propagateHeaders=apm-principal-token + +# OIDC +quarkus.oidc.enabled=false +#quarkus.rest-client.onecx_help_svc_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter +#quarkus.oidc-client.client-id=${quarkus.application.name} +#quarkus.oidc-client.credentials.secret= +#quarkus.oidc-client.auth-server-url=${quarkus.oidc.auth-server-url} + # DEV %dev.quarkus.rest-client.onecx_help_svc.url=http://onecx-help-svc # BUILD quarkus.openapi-generator.codegen.spec.onecx_help_svc_yaml.config-key=onecx_help_svc -quarkus.openapi-generator.codegen.spec.onecx_help_svc_yaml.base-package=gen.io.github.onecx.help.bff.clients +quarkus.openapi-generator.codegen.spec.onecx_help_svc_yaml.base-package=gen.org.tkit.onecx.help.bff.clients quarkus.openapi-generator.codegen.spec.onecx_help_svc_yaml.return-response=true quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi +quarkus.openapi-generator.codegen.spec.onecx_help_svc_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders; + # INTEGRATION TEST quarkus.test.integration-test-profile=test # TEST %test.quarkus.http.test-port=0 -%test.tkit.log.json.enabled=false %test.quarkus.mockserver.devservices.config-class-path=true %test.quarkus.mockserver.devservices.log=false %test.quarkus.mockserver.devservices.reuse=true @@ -23,4 +34,7 @@ quarkus.test.integration-test-profile=test %test.quarkus.mockserver.devservices.config-dir=/mockserver %test.quarkus.rest-client.onecx_help_svc.url=${quarkus.mockserver.endpoint} -# PIPE CONFIG \ No newline at end of file +# PIPE CONFIG + + + diff --git a/src/test/java/io/github/onecx/help/bff/rs/AbstractTest.java b/src/test/java/org/tkit/onecx/help/bff/rs/AbstractTest.java similarity index 96% rename from src/test/java/io/github/onecx/help/bff/rs/AbstractTest.java rename to src/test/java/org/tkit/onecx/help/bff/rs/AbstractTest.java index b8ee325..c5d14a9 100644 --- a/src/test/java/io/github/onecx/help/bff/rs/AbstractTest.java +++ b/src/test/java/org/tkit/onecx/help/bff/rs/AbstractTest.java @@ -1,4 +1,4 @@ -package io.github.onecx.help.bff.rs; +package org.tkit.onecx.help.bff.rs; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; diff --git a/src/test/java/io/github/onecx/help/bff/rs/HelpRestControllerTest.java b/src/test/java/org/tkit/onecx/help/bff/rs/HelpRestControllerTest.java similarity index 77% rename from src/test/java/io/github/onecx/help/bff/rs/HelpRestControllerTest.java rename to src/test/java/org/tkit/onecx/help/bff/rs/HelpRestControllerTest.java index da0913f..9527ed6 100644 --- a/src/test/java/io/github/onecx/help/bff/rs/HelpRestControllerTest.java +++ b/src/test/java/org/tkit/onecx/help/bff/rs/HelpRestControllerTest.java @@ -1,4 +1,4 @@ -package io.github.onecx.help.bff.rs; +package org.tkit.onecx.help.bff.rs; import static io.restassured.RestAssured.given; import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; @@ -19,11 +19,11 @@ import org.mockserver.client.MockServerClient; import org.mockserver.model.JsonBody; import org.mockserver.model.MediaType; +import org.tkit.onecx.help.bff.rs.controller.HelpRestController; import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper; -import gen.io.github.onecx.help.bff.clients.model.*; -import gen.io.github.onecx.help.bff.rs.internal.model.*; -import io.github.onecx.help.bff.rs.controller.HelpRestController; +import gen.org.tkit.onecx.help.bff.clients.model.*; +import gen.org.tkit.onecx.help.bff.rs.internal.model.*; import io.quarkiverse.mockserver.test.InjectMockServerClient; import io.quarkus.test.common.http.TestHTTPEndpoint; import io.quarkus.test.junit.QuarkusTest; @@ -69,11 +69,8 @@ void createNewHelp_shouldReturnHelp() { .withBody(JsonBody.json(data))); CreateHelpDTO input = createHelpDTO("appId1", - "123-456-789", "testContext", - offsetDateTime, "http://localhost:8080/mfe", - "testUser", "itemId1"); // bff call @@ -124,9 +121,6 @@ void createNewHelp_shouldReturnBadRequest_whenBodyEmpty() { .withBody(JsonBody.json(problemDetailResponse))); CreateHelpDTO input = createHelpDTO(null, - null, - null, - null, null, null, null); @@ -195,7 +189,7 @@ void getAllAppsWithHelpItems_shouldReturnHelpAppIdsDTO() { Assertions.assertNotNull(response); Assertions.assertEquals(data.getAppIds(), response.getAppIds()); - Assertions.assertEquals(data.getAppIds().size(), 2); + Assertions.assertEquals(2, data.getAppIds().size()); } @Test @@ -283,92 +277,6 @@ void getHelpByItemId() { } - @Test - void getHelpByItemId_shouldReturnNotFound_whenHelpDoesNotExist() { - - String id = "82689h23-9624-2234-c50b-8749d073c287"; - var offsetDateTime = OffsetDateTime.parse("2023-11-30T13:53:03.688710200+01:00"); - OffsetDateTimeMapper offsetDateTimeMapper = new OffsetDateTimeMapper(); - Help data = createHelp("appId1", - "123-456-789", - "testContext", - offsetDateTime, - "http://localhost:8080/mfe", - "testUser", - "itemId1"); - - mockServerClient - .when(request().withPath(HELP_SVC_INTERNAL_API_BASE_PATH + "/itemId/" + id) - .withMethod(HttpMethod.GET)) - .withPriority(100) - .respond(httpRequest -> response().withStatusCode(Response.Status.OK.getStatusCode()) - .withContentType(MediaType.APPLICATION_JSON) - .withBody(JsonBody.json(data))); - - // bff call - var response = given() - .when() - .contentType(APPLICATION_JSON) - .get("/itemId/" + id) - .then() - .statusCode(Response.Status.OK.getStatusCode()) - .extract().as(HelpDTO.class); - - Assertions.assertNotNull(response); - Assertions.assertEquals(response.getBaseUrl(), data.getBaseUrl()); - Assertions.assertEquals(response.getItemId(), data.getItemId()); - Assertions.assertEquals(offsetDateTimeMapper.map(response.getCreationDate()), - offsetDateTimeMapper.map(data.getCreationDate())); - - } - - @Test - void getHelps() { - - HelpPageResult data = new HelpPageResult(); - data.setNumber(2); - data.setTotalPages(1L); - data.setSize(1); - List helpList = new ArrayList<>(); - helpList.add(createHelp("appId1", - "123-456-789", - "testContext", - null, - "http://localhost:8080/mfe", - "testUser", - "itemId1")); - helpList.add(createHelp("appId2", - "123-456-987", - "testContext2", - null, - "http://localhost:8080/mfe", - "testUser2", - "itemId2")); - data.setStream(helpList); - - mockServerClient - .when(request().withPath(HELP_SVC_INTERNAL_API_BASE_PATH) - .withMethod(HttpMethod.GET)) - .withPriority(100) - .respond(httpRequest -> response().withStatusCode(Response.Status.OK.getStatusCode()) - .withContentType(MediaType.APPLICATION_JSON) - .withBody(JsonBody.json(data))); - - // bff call - var response = given() - .when() - .contentType(APPLICATION_JSON) - .get() - .then() - .statusCode(Response.Status.OK.getStatusCode()) - .extract().as(HelpPageResultDTO.class); - - Assertions.assertNotNull(response); - Assertions.assertEquals(response.getNumber(), 2); - Assertions.assertEquals(response.getSize(), 1); - Assertions.assertEquals(response.getStream().size(), 2); - } - @Test void searchHelps() { @@ -417,8 +325,8 @@ void searchHelps() { .extract().as(HelpPageResultDTO.class); Assertions.assertNotNull(response); - Assertions.assertEquals(response.getNumber(), 2); - Assertions.assertEquals(response.getStream().size(), 2); + Assertions.assertEquals(2, response.getNumber()); + Assertions.assertEquals(2, response.getStream().size()); } @@ -434,6 +342,7 @@ void updateHelp() { .withContentType(MediaType.APPLICATION_JSON)); UpdateHelpDTO updateHelpDTO = new UpdateHelpDTO(); + updateHelpDTO.setModificationCount(0); updateHelpDTO.setAppId("appId1"); updateHelpDTO.setBaseUrl("http://localhost:8080/mfe"); updateHelpDTO.setItemId("itemId1"); @@ -466,6 +375,7 @@ void updateHelp_shouldReturnNotFound_whenHelpDoesNotExist() { .withBody(JsonBody.json(problemDetailResponse))); UpdateHelpDTO updateHelpDTO = new UpdateHelpDTO(); + updateHelpDTO.setModificationCount(0); updateHelpDTO.setAppId("appId1"); updateHelpDTO.setBaseUrl("http://localhost:8080/mfe"); updateHelpDTO.setItemId("itemId1"); @@ -497,15 +407,11 @@ private Help createHelp(String appId, String id, String context, OffsetDateTime return help; } - private CreateHelpDTO createHelpDTO(String appId, String id, String context, OffsetDateTime creationDate, String baseUrl, - String creationUser, String itemId) { + private CreateHelpDTO createHelpDTO(String appId, String context, String baseUrl, String itemId) { CreateHelpDTO helpDTO = new CreateHelpDTO(); helpDTO.setAppId(appId); - helpDTO.setId(id); helpDTO.setContext(context); - helpDTO.setCreationDate(creationDate); helpDTO.setBaseUrl(baseUrl); - helpDTO.setCreationUser(creationUser); helpDTO.setItemId(itemId); return helpDTO; } diff --git a/src/test/java/org/tkit/onecx/help/bff/rs/HelpRestControllerTestIT.java b/src/test/java/org/tkit/onecx/help/bff/rs/HelpRestControllerTestIT.java new file mode 100644 index 0000000..b4a17bc --- /dev/null +++ b/src/test/java/org/tkit/onecx/help/bff/rs/HelpRestControllerTestIT.java @@ -0,0 +1,8 @@ +package org.tkit.onecx.help.bff.rs; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class HelpRestControllerTestIT extends HelpRestControllerTest { + +}