Repository navigation
test: 보안 핵심 기능 단위 테스트 추가 및 CI 파이프라인 개선 - #64
Merged
Merged
Conversation
- Redis 블랙리스트(addToBlacklist, isBlacklisted) 테스트 - RedisThrottlerStorage increment 로직 테스트 (차단/TTL/limit 초과) - JwtStrategy.validate 테스트 (블랙리스트/사용자 미존재/정상) - SignUpUseCase 테스트 (이메일 중복/bcrypt 해싱/토큰 발급) - LoginUseCase 테스트 (USER_NOT_FOUND/INVALID_CREDENTIALS/정상 로그인) - LogoutUseCase 테스트 (TTL 계산/블랙리스트 추가/엣지 케이스) - RefreshUseCase 테스트 (토큰 rotation/새 토큰 발급) - FindOrCreateGithubUserUseCase 테스트 (4가지 분기 시나리오) - jest moduleNameMapper에 @@* 및 src/* 경로 alias 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- RedisThrottlerStorage가 Redis 클라이언트를 직접 받던 방식을 RedisService를 주입받아 getClient()로 사용하는 방식으로 변경 - RedisModule에 RedisThrottlerStorage provider/export 추가 - AppModule ThrottlerModule 설정에서 RedisThrottlerStorage를 DI로 주입 - GitHub Actions CI 파이프라인에 test 단계 추가 (lint → test → build 순서) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- jwt.strategy.spec.ts mock 클래스 빈 생성자에 biome-ignore 추가 - require로 지연 import한 JwtStrategy 변수/타입 프로퍼티 naming convention biome-ignore 추가 - auto-fix로 spec 파일 상수명 SCREAMING_SNAKE_CASE → PascalCase 변경 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
테스트 실행 전 Prisma Client를 생성하지 않아 PrismaService 타입 에러로 ts-jest 컴파일 실패하는 문제 수정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This branch was successfully deployed
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.
Summary
RedisThrottlerStorage가 raw Redis 클라이언트 대신RedisService를 NestJS DI로 주입받도록 변경lint → test → build순서로 test 단계 추가변경 내용
Redis 리팩토링 (
refactor)RedisThrottlerStorage생성자:Redis클라이언트 직접 주입 →RedisService주입 후getClient()사용RedisModule:RedisThrottlerStorage를 provider/export에 등록AppModuleThrottlerModule:new RedisThrottlerStorage(redisService.getClient())→ DI로 주입단위 테스트 (
test)redis.service.spec.tsblacklist:{token}키 형식, 존재 여부 판별redis-throttler.storage.spec.tsjwt.strategy.spec.tsREVOKED_TOKEN, 미존재 유저 →USER_NOT_FOUNDsign-up.use-case.spec.tslogin.use-case.spec.tsINVALID_CREDENTIALSlogout.use-case.spec.tsrefresh.use-case.spec.tsfind-or-create-github-user.use-case.spec.tsCI 파이프라인 (
ci).github/workflows/lint.yaml에testjob 추가lint → test → build(이전:lint → build)pnpm --filter @repo/api test실행jest 설정
apps/api/package.json에moduleNameMapper추가 (@@*,src/*path alias 처리)Test plan
pnpm --filter @repo/api test→ 49개 통과 확인🤖 Generated with Claude Code