Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: testcontainers 추가 (#16) #72

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ val jsoupVersion = "1.17.1"
val jjwtVersion = "0.12.3"
val mockkVersion = "1.13.4"
val springMockkVersion = "4.0.2"
val testcontainersVersion = "1.19.3"
val testcontainersMysqlVersion = "1.19.3"
val kotestVersion = "5.7.2"
val kotestExtensionTestcontainers = "2.0.2"
val kotestExtensionSpring = "1.1.3"
Laeng marked this conversation as resolved.
Show resolved Hide resolved

dependencies {
Expand Down Expand Up @@ -87,9 +90,14 @@ dependencies {
// Spring Mockk
testImplementation("com.ninja-squad:springmockk:$springMockkVersion")

// Testcontainers
testImplementation("org.testcontainers:testcontainers:$testcontainersVersion")
testImplementation("org.testcontainers:mysql:$testcontainersMysqlVersion")

// Kotest
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("io.kotest.extensions:kotest-extensions-testcontainers:$kotestExtensionTestcontainers")
testImplementation("io.kotest.extensions:kotest-extensions-spring:$kotestExtensionSpring")

// Mock Web Server
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
spring:
datasource:
url: jdbc:h2:mem:test;MODE=MYSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
url: jdbc:tc:mysql:8://test_db
Laeng marked this conversation as resolved.
Show resolved Hide resolved
jpa:
hibernate:
ddl-auto: create
Expand Down