Repository navigation
feat: 예시 컨트롤러와 테스트 도우미, README 추가 - #47
Merged
Merged
Conversation
도메인 컨트롤러의 본보기와 골격 완료 기준 테스트 5개를 둔다. 계약에 명세가 없는 API라 테스트 소스에만 둔다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
전체 컨텍스트 테스트가 테스트 소스의 예시 컨트롤러를 잡고, 테스트 설정에만 있는 로더를 찾지 못해 뜨지 않았다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
example패키지에 도메인 컨트롤러 본보기를 둔다.{grn}을Grn으로 받고,@RequirePermission과 같은Action을 로더에 넘기며,listVisible과CursorPage로 목록을 돌려주고, service가BusinessException을 던진다. 계약에 명세가 없는 API라 운영 코드에는 넣지 않는다@ApiWebMvcTest(XController::class)로 실제 인증 필터·오류 형식·요청 id를 켜고,TestTokens.user()/admin()과bearer()로 토큰을 붙인다. 토큰은 개발용 토큰 API와 같은AccessTokenProvider.issue로 발급한다permissions, 도메인 오류 테스트를 함께 둔다팀 도메인이 생기기 전까지 로더가 Spring 빈이 아니어서, 테스트 설정(
ExampleTestConfig)에서 직접 만든다.Test plan
./gradlew ktlintCheck./gradlew test --tests 'com.gsmsv.api.example.*' --tests 'com.gsmsv.api.global.security.*' --tests 'com.gsmsv.api.global.grn.*'(예시 테스트 8개 포함 통과)관련 이슈
Closes #25
확인
🤖 Generated with Claude Code