diff --git a/build.gradle b/build.gradle index 245d65bc..5c7aa958 100644 --- a/build.gradle +++ b/build.gradle @@ -59,6 +59,7 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' + testImplementation group: 'com.h2database', name: 'h2', version: '2.1.214' implementation group: 'org.hibernate.orm', name: 'hibernate-core', version: '6.2.0.Final' runtimeOnly 'com.mysql:mysql-connector-j' @@ -69,7 +70,7 @@ dependencies { } -tasks.named('test') { +test { useJUnitPlatform() } diff --git a/src/main/resources/application-test.yaml b/src/main/resources/application-test.yaml new file mode 100644 index 00000000..71c953ad --- /dev/null +++ b/src/main/resources/application-test.yaml @@ -0,0 +1,28 @@ +spring: + security: + oauth2: + client: + registration: + kakao: + redirect-uri: "http://localhost:8080/login/oauth2/code/kakao" + apple: + redirectUri: "http://localhost:8080/login/oauth2/code/apple" + + datasource: + url: jdbc:h2:mem:test + username: sa + password: + driver-class-name: org.h2.Driver + jpa: + hibernate: + ddl-auto: update + properties: + hibernate: + format_sql: 'true' + use_sql_comments: 'true' + show_sql: 'true' + database-platform: org.hibernate.dialect.MySQL8Dialect +redis: + host: localhost + + diff --git a/src/test/java/com/gt/genti/service/DiscordLogTest.java b/src/test/java/com/gt/genti/service/DiscordLogTest.java index 70149436..a98c1d47 100644 --- a/src/test/java/com/gt/genti/service/DiscordLogTest.java +++ b/src/test/java/com/gt/genti/service/DiscordLogTest.java @@ -9,7 +9,7 @@ @Slf4j public class DiscordLogTest { @Test - void loggingError(){ + void loggingError() { log.error("오류"); log.warn("워닝"); log.info("정보");