Feature/bael 5756 choose api (#13227)

* BAEL-5756: Rest controller

* BAEL-5756: GraphQL controller (without tests)

* BAEL-5756: Fix GraphQL test

* BAEL-5756: Fix GraphQL test 2

* BAEL-5756: GRPC working

* BAEL-5756: GRPC with Spring Boot

* BAEL-5756: Books proto service

* BAEL-5756: Fix grpc integration test

* BAEL-5756: Refactor

* BAEL-5756: Revert some changes

* BAEL-5756: Fix integration tests port issue between gRPC and GraphQL

* BAEL-5756: Fix pom merge issue

* BAEL-5756: Fix typo
This commit is contained in:
Daniel Strmecki
2023-01-03 14:52:58 +01:00
committed by GitHub
parent f675bb0863
commit a4ccc5524a
4 changed files with 52 additions and 46 deletions

View File

@@ -2,8 +2,10 @@ server:
port: 8082
spring:
main:
allow-bean-definition-overriding: true
graphql:
graphiql:
enabled: true
schema:
locations: classpath:chooseapi/
locations: classpath:chooseapi/

View File

@@ -11,7 +11,9 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = ChooseApiApp.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = { "grpc.server.port=-1" }, // Disable gRPC external server
classes = ChooseApiApp.class)
@ActiveProfiles("chooseapi")
class BooksControllerGraphQLIntegrationTest {

View File

@@ -9,13 +9,15 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@SpringBootTest
@SpringBootTest(properties = { "grpc.server.port=-1" }) // Disable gRPC external server
@ActiveProfiles("chooseapi")
@AutoConfigureMockMvc
class BooksControllerRestIntegrationTest {