- AuthControllerWebMvcTest(@WebMvcTest): 실제 인터셉터·경로매핑 로드해 검증 · 보호 경로(verify-password/profile/me) 토큰 없으면 401(500 아님) · 유효 토큰이면 컨트롤러 도달(CURRENT_MEMBER 주입), 공개 경로(signup-enabled) 200 · 단위테스트가 못 잡은 인터셉터 와이어링 누락(이번 500 버그)을 잡는 계층 · @MapperScan 매퍼는 DB 없는 경량 SqlSessionFactory로 빈 생성만 통과 - deploy.yaml: clean build 가 @SpringBootTest(SbBtApplicationTests) 포함 → CI와 동일한 MariaDB/Redis 서비스+env 추가 (없으면 배포 게이트가 DB 못 붙어 실패 → 직전 게이트 변경이 배포를 깨뜨렸던 문제 수정) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,34 @@ on:
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# clean build 가 테스트(@SpringBootTest 컨텍스트 로드 포함)를 돌리므로 CI와 동일한 DB/Redis 필요
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:11
|
||||
env:
|
||||
MARIADB_ROOT_PASSWORD: ci_root_pw
|
||||
MARIADB_DATABASE: sb_db
|
||||
options: >-
|
||||
--health-cmd="healthcheck.sh --connect --innodb_initialized"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=15
|
||||
redis:
|
||||
image: redis:7
|
||||
options: >-
|
||||
--health-cmd="redis-cli ping"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=10
|
||||
|
||||
env:
|
||||
DB_URL: jdbc:mariadb://mariadb:3306/sb_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Seoul
|
||||
DB_USERNAME: root
|
||||
DB_PASSWORD: ci_root_pw
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: '6379'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user