From b0bdf6e8008cb21f9c0edf3bc51fe3d9af5eb2b4 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 18 Apr 2024 13:56:31 +0100 Subject: [PATCH] add version to embedded mongo for tests --- pom.xml | 1 + .../java/xyz/mcutils/backend/config/TestMongoConfig.java | 6 ------ .../xyz/mcutils/backend/tests/MojangControllerTests.java | 1 - .../xyz/mcutils/backend/tests/PlayerControllerTests.java | 1 - .../xyz/mcutils/backend/tests/ServerControllerTests.java | 1 - 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 98ca33b..1f4930c 100644 --- a/pom.xml +++ b/pom.xml @@ -173,6 +173,7 @@ de.flapdoodle.embed de.flapdoodle.embed.mongo + 4.12.6 test diff --git a/src/test/java/xyz/mcutils/backend/config/TestMongoConfig.java b/src/test/java/xyz/mcutils/backend/config/TestMongoConfig.java index 473a3cf..0bf6fde 100644 --- a/src/test/java/xyz/mcutils/backend/config/TestMongoConfig.java +++ b/src/test/java/xyz/mcutils/backend/config/TestMongoConfig.java @@ -1,13 +1,7 @@ package xyz.mcutils.backend.config; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.PreDestroy; -import lombok.NonNull; import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest; import org.springframework.boot.test.context.TestConfiguration; -import redis.embedded.RedisServer; - -import java.io.IOException; /** * Test configuration for diff --git a/src/test/java/xyz/mcutils/backend/tests/MojangControllerTests.java b/src/test/java/xyz/mcutils/backend/tests/MojangControllerTests.java index 44fbbaa..982edf2 100644 --- a/src/test/java/xyz/mcutils/backend/tests/MojangControllerTests.java +++ b/src/test/java/xyz/mcutils/backend/tests/MojangControllerTests.java @@ -3,7 +3,6 @@ package xyz.mcutils.backend.tests; import cc.fascinated.config.TestRedisConfig; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; diff --git a/src/test/java/xyz/mcutils/backend/tests/PlayerControllerTests.java b/src/test/java/xyz/mcutils/backend/tests/PlayerControllerTests.java index 195f7fd..ab96aa5 100644 --- a/src/test/java/xyz/mcutils/backend/tests/PlayerControllerTests.java +++ b/src/test/java/xyz/mcutils/backend/tests/PlayerControllerTests.java @@ -3,7 +3,6 @@ package xyz.mcutils.backend.tests; import cc.fascinated.config.TestRedisConfig; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; diff --git a/src/test/java/xyz/mcutils/backend/tests/ServerControllerTests.java b/src/test/java/xyz/mcutils/backend/tests/ServerControllerTests.java index 761785a..1b4647e 100644 --- a/src/test/java/xyz/mcutils/backend/tests/ServerControllerTests.java +++ b/src/test/java/xyz/mcutils/backend/tests/ServerControllerTests.java @@ -3,7 +3,6 @@ package xyz.mcutils.backend.tests; import cc.fascinated.config.TestRedisConfig; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType;