Skip to content

test: AuthController @WebMvcTest 추가 - #230

Merged
unam98 merged 1 commit into
devfrom
tests/auth-controller-test
Aug 6, 2026
Merged

test: AuthController @WebMvcTest 추가#230
unam98 merged 1 commit into
devfrom
tests/auth-controller-test

Conversation

@unam98

@unam98 unam98 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

작업 배경

  • 컨트롤러 @WebMvcTest 스윕의 마지막 배치. AuthController의 로그인/회원가입 분기 로직과 토큰 재발급의 라우팅/@validated 검증/예외→HTTP 상태코드 매핑을 검증한다.
  • 이로써 서비스 레이어(11개 서비스) + 컨트롤러 레이어(8개 컨트롤러) 전 계층 테스트가 갖춰졌다.

변경 사항

영역 내용
auth/controller/AuthControllerTest.java (신규) 로그인/토큰재발급 2개 엔드포인트 (8 테스트)

영향 범위

  • 테스트 전용 변경, 프로덕션 코드 변경 없음.
  • signIn이 서비스 응답 타입(SignInResponseDto vs SignUpResponseDto)에 따라 LOGIN/SIGNUP 성공 메시지를 분기하는 컨트롤러 자체 로직을 실제로 검증한다.
  • AuthController는 클래스에 @Validated가 있어(다른 컨트롤러들과 달리) @RequestHeader@NotBlank가 실제로 동작함을 확인했다.

검증 매트릭스

영향 범위 테스트 코드
POST /api/auth 기존 유저 로그인 분기 기존_유저_로그인
POST /api/auth 신규 유저 회원가입 분기 신규_유저_회원가입
POST /api/auth token 없으면 400 토큰_없음
POST /api/auth provider 없으면 400 프로바이더_없음
GET /api/auth/getNewToken 정상 재발급 정상_재발급
GET /api/auth/getNewToken refreshToken 헤더 없으면 400 리프레시토큰_헤더_없음
GET /api/auth/getNewToken refreshToken 빈 문자열이면 400 리프레시토큰_빈문자열
GET /api/auth/getNewToken 토큰 불일치면 401 리프레시토큰_불일치

Test Plan

  • AuthControllerTest 8/8 통과
  • 로컬 postgres/redis 기동 후 ./gradlew test 전체 251/251 통과

🤖 Generated with Claude Code

컨트롤러 @WebMvcTest 스윕의 마지막 배치로, 로그인/회원가입 분기(signIn의
응답 타입에 따른 LOGIN/SIGNUP 성공 메시지 분기)와 토큰 재발급의 라우팅/
@validated 검증/예외→HTTP 상태코드 매핑을 검증한다.
@unam98 unam98 self-assigned this Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@unam98, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ce4d014-ca6e-4937-9ec9-4cc069aac2d9

📥 Commits

Reviewing files that changed from the base of the PR and between 03050ac and 57a6614.

📒 Files selected for processing (1)
  • src/test/java/org/runnect/server/auth/controller/AuthControllerTest.java

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unam98
unam98 merged commit e063716 into dev Aug 6, 2026
2 checks passed
@unam98
unam98 deleted the tests/auth-controller-test branch August 6, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants