Skip to content

Commit 20661a6

Browse files
committed
Test: 테스트 환경변수 설정 및 프로파일
1 parent b269c61 commit 20661a6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/resources/application-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ spring:
33
url: jdbc:h2:mem:db_test;MODE=MySQL
44
driver-class-name: org.h2.Driver
55
username: sa
6-
password:
6+
password:
7+
8+
jwt:
9+
secret: test-jwt-secret-key-12345678901234567890

src/test/java/com/back/JwtSecurityIntegrationTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
import org.springframework.beans.factory.annotation.Autowired;
77
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
88
import org.springframework.boot.test.context.SpringBootTest;
9+
import org.springframework.test.context.ActiveProfiles;
910
import org.springframework.test.web.servlet.MockMvc;
1011

1112
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
1213
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
1314

1415
@SpringBootTest
1516
@AutoConfigureMockMvc
17+
@ActiveProfiles("test")
1618
class JwtSecurityIntegrationTest {
1719

1820
@Autowired

0 commit comments

Comments
 (0)