-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat] 스케줄링을 위한, S3 URL을 반환하는 신고글 랜덤 조회 기능 구현 #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…준 하루 전 공고를 반환함
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
Test Results390 tests 390 ✅ 1m 10s ⏱️ Results for commit 5cc75d9. |
📊 JaCoCo Coverage
|
JangIkhwan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
꼼꼼한 테스트가 좋았어요! 고생하셨습니다.
|
|
||
| List<String> imageUrls = report.getReportImages().stream() | ||
| .map(ReportImage::getImageUrl) | ||
| .filter(url -> url != null && !url.isBlank()) | ||
| .distinct() | ||
| .toList(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예전에 작성해주신 신고글 저장 로직을 보면 이미지 URL 중복을 제거하시긴 하던데, 여기서도 중복 제거를 수행하네요. 의도하신건가요??
| // given | ||
| MissingReport report1 = mock(MissingReport.class); | ||
| MissingReport report2 = mock(MissingReport.class); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
테스트를 작성해보면서 느낀 건데 도메인이나 DTO는 mock하지 않는 것도 괜찮은 것 같더라고요. 나중에 테스트 코드가 수정되면 mocking할게 늘어나서 조금 귀찮을 수도 있거든요. 근데 지금도 괜찮긴합니다! 👍
Related issue 🛠
Work Description 📝
파이썬 스케줄러에서 호출해서 인스타그램 홍보용 컨텐츠 자동 생성에 활용할 용도로 활용되는 API입니다. 기존 보호글 랜덤 조회 기능 말고 신고글 랜덤 조회도 필요하다는 요청이 있어 구현했습니다.
보호글 랜덤 조회 기능과 로직이 거의 동일하지만, s3로 업로드 하는 로직이 불필요하기에, 해당 부분만 상이합니다.
MissingReportDetailStrategy에 공통 매핑 메서드를 추가했습니다. (toDetailDto)
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢