BAEL-6649: code review #2

This commit is contained in:
emanuel.trandafir 2023-08-21 08:25:30 +02:00
parent d3b6ca6974
commit 8532ae8aa9
4 changed files with 9 additions and 15 deletions

View File

@ -20,35 +20,29 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId> <artifactId>spring-boot-starter</artifactId>
<version>${spring-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId> <artifactId>spring-boot-devtools</artifactId>
<version>${spring-boot.version}</version>
<scope>runtime</scope> <scope>runtime</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId> <artifactId>spring-boot-starter-data-mongodb</artifactId>
<version>${spring-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId> <artifactId>spring-boot-testcontainers</artifactId>
<version>${spring-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
@ -73,7 +67,7 @@
<dependency> <dependency>
<groupId>io.rest-assured</groupId> <groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId> <artifactId>rest-assured</artifactId>
<version>5.3.1</version> <version>${rest-assured.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@ -102,7 +96,7 @@
<properties> <properties>
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version> <maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
<testcontainers.version>1.18.3</testcontainers.version> <testcontainers.version>1.18.3</testcontainers.version>
<spring-boot.version>3.1.0</spring-boot.version> <rest-assured.version>5.3.1</rest-assured.version>
</properties> </properties>
</project> </project>

View File

@ -52,8 +52,8 @@ class DynamicPropertiesIntegrationTest {
)); ));
when().get("/characters?race=hobbit") when().get("/characters?race=hobbit")
.then().statusCode(200) .then().statusCode(200)
.and().body("name", hasItems("Frodo", "Samwise")); .and().body("name", hasItems("Frodo", "Samwise"));
} }
} }

View File

@ -8,12 +8,12 @@ import org.springframework.context.annotation.Bean;
import org.testcontainers.containers.MongoDBContainer; import org.testcontainers.containers.MongoDBContainer;
import org.testcontainers.utility.DockerImageName; import org.testcontainers.utility.DockerImageName;
public class LocalDevApplication { class LocalDevApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.from(Application::main) SpringApplication.from(Application::main)
.with(LocalDevTestcontainersConfig.class) .with(LocalDevTestcontainersConfig.class)
.run(args); .run(args);
} }
@TestConfiguration(proxyBeanMethods = false) @TestConfiguration(proxyBeanMethods = false)

View File

@ -48,8 +48,8 @@ class ServiceConnectionIntegrationTest {
)); ));
when().get("/characters?race=hobbit") when().get("/characters?race=hobbit")
.then().statusCode(200) .then().statusCode(200)
.and().body("name", hasItems("Frodo", "Samwise")); .and().body("name", hasItems("Frodo", "Samwise"));
} }
} }