Skip to content

Commit

Permalink
refactor: testcontainers 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
aiaiaiai1 committed Sep 29, 2024
1 parent a5910fa commit 016cfca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'



implementation 'org.mindrot:jbcrypt:0.4'
// implementation 'org.flywaydb:flyway-core'
// implementation 'org.flywaydb:flyway-mysql'
testImplementation "org.testcontainers:testcontainers:1.20.1"
testImplementation "org.testcontainers:mysql:1.20.1"
testImplementation "org.testcontainers:junit-jupiter:1.20.1"


implementation 'io.jsonwebtoken:jjwt-api:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.5'
Expand Down
1 change: 0 additions & 1 deletion src/main/java/gymmi/entity/TimeEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public abstract class TimeEntity {
@Column(columnDefinition = "timestamp(3)", nullable = false, updatable = false)
private LocalDateTime createdAt;

@Temporal(TemporalType.TIMESTAMP)
@LastModifiedDate
@Column(columnDefinition = "timestamp(3)", nullable = false)
private LocalDateTime lastModifiedAt;
Expand Down
8 changes: 3 additions & 5 deletions src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spring:

jpa:
hibernate:
ddl-auto: create
ddl-auto: create-drop

h2:
console:
Expand All @@ -14,7 +14,5 @@ spring:
web-allow-others: true

datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:db;MODE=MySQL
username: sa
password:
driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
url: jdbc:tc:mysql:8.4.0:///

0 comments on commit 016cfca

Please sign in to comment.