-
Notifications
You must be signed in to change notification settings - Fork 1
[test] 투표 기능 단위 테스트 작성 #47
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
Conversation
- Github 객체 비교를 기반으로 확인하도록 수정 - 보유하지 않는 경우를 확인하는 과정이 많음에 따라 로직 수정
- findByRepositoryId > findById로 수정 - 객체간 비교를 통해 사용자가 github repo를 보유했는지 확인토록 수정
이하 기능들에 대한 단위 테스트 추가 - 투표 사용자 토큰 생성 - 토큰으로부터 이메일 파싱
# Conflicts: # src/main/java/com/specialwarriors/conal/github_repo/exception/GithubRepoException.java # src/main/java/com/specialwarriors/conal/github_repo/service/GithubRepoQuery.java # src/main/java/com/specialwarriors/conal/github_repo/service/GithubRepoService.java
- 메서드명 수정 - 사용자 엔티티를 통해 올바른 github repo 접근인지 확인토록 로직 변경
각 테스트 메서드의 독립성을 확보하기 위해 데이터 세팅/클렌징을 메서드 단위로 실행토록 수정
|
dnjstjt1297
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.
제 파트코드의 리팩토링 감사하고 고생하셨습니다~
| @Entity | ||
| @Getter | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| @EqualsAndHashCode(of = "id") |
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.
Id기반으로 객체를 비교하면 어떤점에서 좋은가요?
| UNAUTHORIZED_GITHUB_REPO_ACCESS(HttpStatus.FORBIDDEN, "리포지토리 접근 권한이 없습니다"), | ||
| GITHUB_REPO_NAME_NOT_FOUND(HttpStatus.NOT_FOUND, "깃허브 리포지토리 이름을 찾을 수 없습니다"), | ||
| GITHUB_REPO_NOT_FOUND(HttpStatus.NOT_FOUND, "깃허브 리포지토리를 찾을 수 없습니다"), | ||
| GITHUB_REPO_EMAIL_NOT_FOUND(HttpStatus.NOT_FOUND, "기여자 이메일이 없습니다"), | ||
| GITHUB_REPO_EMAIL_LIMIT_EXCEED(HttpStatus.BAD_REQUEST, "이메일은 5개까지 등록할 수 있습니다"), | ||
| INVALID_GITHUB_REPO_URL(HttpStatus.BAD_REQUEST, "잘못된 URL 입니다."), | ||
| INVALID_GITHUB_REPO_EMAIL(HttpStatus.BAD_REQUEST, "잘못된 이메일 입니다"), | ||
| INVALID_GITHUB_REPO_DURATION(HttpStatus.NOT_FOUND, "종료일이 존재하지 않습니다"); |
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.
제가 했어야했는데 죄송합니다...
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.
sql로 테스트코드 짜는 방법 잘 배워갑니다~!
📌 작업 개요
✨ 기타 참고 사항
cd.ymlAWS 비용 지출 이슈로 임시 비활성화🔗 관련 이슈