Skip to content

Commit

Permalink
ci(application.yml): test시에 h2 memory db 사용하도록 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobhboy committed Dec 26, 2023
1 parent 1afb567 commit 1eade5e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ dependencies {
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

testRuntimeOnly 'com.h2database:h2'
}

tasks.named('test') {
Expand Down
18 changes: 18 additions & 0 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
spring:
datasource:
url: jdbc:h2:mem:testdb;MODE=MySQL;NON_KEYWORDS=USER
username: sa
password:
jpa:
show-sql: true
properties:
hibernate:
format_sql: true
default_batch_fetch_size: 30
defer-datasource-initialization: true
sql:
init:
mode: always
h2:
console:
enabled: true

0 comments on commit 1eade5e

Please sign in to comment.