Skip to content
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

test: 인증 단위 테스트 구현 #202

Merged
merged 5 commits into from
Feb 12, 2024
Merged

test: 인증 단위 테스트 구현 #202

merged 5 commits into from
Feb 12, 2024

Conversation

choidongkuen
Copy link
Member

@choidongkuen choidongkuen commented Feb 12, 2024

🚀 어떤 기능을 개발했나요?

  • JWT 관련 인증 단위 태스트을 구현하고 테스트 합니다.

🕶️ 어떻게 해결했나요?

  • JwtAuthenticationFilterTest 구현
    • api 요청시 헤더를 통해 전달되는 JWT 인증 관련 단위 테스트
  • JwtAuthenticationEntryPointTest 구현
    • api 요청시 Authentication Exception 발생시 호출되는 인증 실패 로직 관련 단위 테스트
  • 불필요한 인증 로직 제거

🦀 이슈 넘버

Copy link

sonarcloud bot commented Feb 12, 2024

@@ -31,7 +30,7 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
private final JwtProperty jwtProperty;

@Override
protected void doFilterInternal(HttpServletRequest request,
public void doFilterInternal(HttpServletRequest request,
Copy link
Member

Choose a reason for hiding this comment

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

테스트 때문에 열어둔거면 @VisibleForTesting 붙여주면 좋을것 같습니당

Copy link
Member Author

Choose a reason for hiding this comment

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

좋아요~

Comment on lines 1 to +5
package net.teumteum.unit.user.service;

import static net.teumteum.unit.auth.common.SecurityValue.VALID_ACCESS_TOKEN;
import static net.teumteum.unit.auth.common.SecurityValue.VALID_REFRESH_TOKEN;

import static net.teumteum.unit.common.SecurityValue.VALID_ACCESS_TOKEN;
import static net.teumteum.unit.common.SecurityValue.VALID_REFRESH_TOKEN;
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

@ddingmin ddingmin left a comment

Choose a reason for hiding this comment

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

제목도 test로 바꿔주면 좋을 것 같습니당 라벨도 피쳐 떼어주세요 자동으로 붙은듯?!?!

@choidongkuen choidongkuen changed the title feat: 인증 단위 테스트 구현 test: 인증 단위 테스트 구현 Feb 12, 2024
@choidongkuen choidongkuen merged commit e5a4953 into develop Feb 12, 2024
3 checks passed
@choidongkuen choidongkuen deleted the iss-#198 branch February 12, 2024 12:13
ddingmin added a commit that referenced this pull request Feb 12, 2024
* test: test 명 완성

* refactor: Instant를 모두 LocalDateTime으로 변경 (#200)

* fix: 알림이 가지 않는 버그 수정

* �test: 인증 단위 테스트 구현 (#202)

* refactor: JwtAuthenticationFilter 불필요한 로직 제거 (#198)

* refactor: SecurityValue 패키지 이동 (#198)

* test: 인증 관련 단위 테스트 구현 (#198)

* test: 인증 관련 단위 테스트 구현 (#198)

* test: JwtAuthenticationFilterTest 리팩토링 (#198)

* feat: 로그인한 유저가 북마크한 모임 조회 (#204)

* feat: 로그인한 유저가 북마크한 모임 조회

* test: 테스트 코드에 로그인 로직 추가

---------

Co-authored-by: choidongkuen <[email protected]>
Co-authored-by: devxb <[email protected]>
Co-authored-by: xb205 <[email protected]>
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.

feat: 인증 관련 단위 테스트 구현
2 participants