test: AI 파이프라인 단위 테스트 추가 - #20
Merged
Merged
Conversation
PR1(책임 분리)·PR2(@ConfigurationProperties) 리팩토링의 효과를 직접 검증하는 단위 테스트 13개 추가. 도메인/외부 모듈 모두 첫 단위 테스트 도입. 신규 테스트: - MaskGeneratorTest (demo-domain, 5건) - README "LAMA 인페인팅 가장자리 잔상" 트러블슈팅 직접 검증 - 박스 20px 확장, 좌상/우하 경계 클램핑, 빈 입력, 다중 박스 - GptVisionClientTest (demo-external, 5건) - PR2의 record properties 효과 — Spring 컨텍스트 없이 new OpenAiProperties(...)로 주입 - MockRestServiceServer로 OpenAI 호출 모킹 - 200 OK 파싱, 429 → AI_RATE_LIMIT_EXCEEDED, 빈 choices → AI_PROMPT_FAILED - 비교 분석의 429 일관 처리 (PR1 사일런트 버그 수정 검증) - AiProcessorTest (demo-domain, 3건) - PR1의 DIP 효과 — ExternalAiClient 인터페이스만 mock으로 흐름 검증 - 빈 boxes → AI_DETECTION_EMPTY + LAMA 미호출 보장 - 정상 흐름 → 마스크 생성 후 LAMA 호출 + URL 반환 - 분석 결과 저장 verify 검증: - ./gradlew test 통과 — 13/13 PASS, 0 FAIL - 의존성 추가 없음 (spring-boot-starter-test 기존 보유) - 외부 인프라 호출 0 (모두 mock) Co-Authored-By: Claude Opus 4.6 (1M context) <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.
PR1(책임 분리)·PR2(@ConfigurationProperties) 리팩토링의 효과를 직접 검증하는 단위 테스트 13개 추가. 도메인/외부 모듈 모두 첫 단위 테스트 도입.
신규 테스트:
검증: