Skip to content

Conversation

@Minjae-An
Copy link
Collaborator

📌 작업 개요

  • 투표 기능 단위 테스트 작성

✨ 기타 참고 사항

  • 코드 커버리지 측정을 위해 Jacoco 도입. CI 과정에서 커버리지 측정 결과 코멘트 자동 생성
  • cd.yml AWS 비용 지출 이슈로 임시 비활성화

🔗 관련 이슈

Minjae-An added 30 commits May 15, 2025 11:14
- 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 접근인지 확인토록 로직 변경
각 테스트 메서드의 독립성을 확보하기 위해 데이터 세팅/클렌징을
메서드 단위로 실행토록 수정
@github-actions
Copy link

Overall Project 24.92% -2.47%
Files changed 55.86%

File Coverage
GithubRepoQuery.java 100% 🍏
VoteService.java 100% 🍏
User.java 81.25% 🍏
GithubRepoService.java 3.77% -12.55%
GithubRepo.java 0% 🍏
UrlUtil.java 0% -13.16%
NotificationService.java 0% -36.84%

@Minjae-An Minjae-An merged commit 74e3aa3 into dev May 23, 2025
1 check passed
@Minjae-An Minjae-An linked an issue May 23, 2025 that may be closed by this pull request
3 tasks
Copy link
Member

@dnjstjt1297 dnjstjt1297 left a 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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Id기반으로 객체를 비교하면 어떤점에서 좋은가요?

Comment on lines +12 to +19
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, "종료일이 존재하지 않습니다");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 했어야했는데 죄송합니다...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sql로 테스트코드 짜는 방법 잘 배워갑니다~!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[test] 투표 기능 단위 테스트 작성

3 participants