From f61caa4bbbc01597aeee6110f9c66d06f79414bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=A4=80=ED=99=98?= Date: Fri, 11 Jul 2025 16:50:07 +0900 Subject: [PATCH] =?UTF-8?q?:test=5Ftube:=20test:=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=ED=99=98=EA=B2=BD=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 9 ++++--- src/test/resources/application-test.yml | 32 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/test/resources/application-test.yml diff --git a/build.gradle b/build.gradle index 494dbc6..46f4563 100644 --- a/build.gradle +++ b/build.gradle @@ -31,9 +31,6 @@ dependencies { compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.mysql:mysql-connector-j' annotationProcessor 'org.projectlombok:lombok' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.security:spring-security-test' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' // JWT implementation 'io.jsonwebtoken:jjwt-api:0.12.3' @@ -51,6 +48,12 @@ dependencies { // redis implementation 'org.springframework.boot:spring-boot-starter-data-redis' + + // test + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'org.springframework.security:spring-security-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + testImplementation 'com.h2database:h2' } tasks.named('test') { diff --git a/src/test/resources/application-test.yml b/src/test/resources/application-test.yml new file mode 100644 index 0000000..72aa8aa --- /dev/null +++ b/src/test/resources/application-test.yml @@ -0,0 +1,32 @@ +spring: + config: + activate: + on-profile: local + datasource: + url: jdbc:h2:mem:with_time + username: sa + password: + driver-class-name: org.h2.Driver + jpa: + show-sql: true + hibernate: + ddl-auto: create + data: + redis: + host: dummy_redis + port: 6379 + +jwt: + secret: dummy_secret_key123456789101122 + time: + access-token: 3600000 + refresh-token: 10000000 + +beginner: + api: + payload: + discord: + scope: + - Exception + web-hook-url: dummy_webhook + enable: false \ No newline at end of file