Skip to content

test: UserStampService 유닛 테스트 + Redis 보안 설정 반영 (prod) - #235

Merged
unam98 merged 1 commit into
mainfrom
tests/userstamp-redis-security-to-main
Aug 11, 2026
Merged

test: UserStampService 유닛 테스트 + Redis 보안 설정 반영 (prod)#235
unam98 merged 1 commit into
mainfrom
tests/userstamp-redis-security-to-main

Conversation

@unam98

Copy link
Copy Markdown
Collaborator

작업 배경

dev/main 컨텐츠 정합성 점검의 마지막 단계. dev에서 이미 검증된 UserStampService 유닛 테스트와, Redis 연결에 비밀번호/SSL/타임아웃을 지원하도록 한 보안 강화가 main엔 반영되어 있지 않았다.

변경 사항

영역내용
config/redis/RedisConfig.javaspring.data.redis.password/ssl.enabled 값 지원 추가, 커넥션/커맨드 타임아웃 30초로 명시 설정
user/service/UserStampServiceTest.java (신규)스탬프 생성 기준(1/10/30개), 레벨업 로직(4의 배수), 조회 예외 처리 등 17개 유닛 테스트

영향 범위

  • RedisConfig: password/ssl 값은 기본값(빈 문자열/false)이라 값을 설정하지 않으면 기존과 동일하게 동작 — 운영 환경에 실제로 반영하려면 spring.data.redis.password/ssl.enabled 값을 채워야 함.
  • 나머지는 테스트 전용 변경, 런타임 영향 없음.

검증 매트릭스

영향 범위테스트 코드
스탬프 생성 기준(1/10/30개, 레벨 없는 타입만 생성)createStampByUser 테스트 그룹
레벨업 로직(4의 배수, 12 초과 시 정지)스탬프_4개면_레벨업
스탬프 목록 조회/존재하지 않는 유저 예외findUserStamps 테스트 그룹

Test Plan

  • 로컬 postgres/redis 기동 후 ./gradlew test 전체 251/251 통과

🤖 Generated with Claude Code

dev에서 검증 완료된 UserStampServiceTest(스탬프 생성/레벨업 로직 17개
테스트)와 RedisConfig의 비밀번호/SSL/타임아웃 설정을 main에 반영한다.
비밀번호/SSL은 spring.data.redis.password, spring.data.redis.ssl.enabled
값이 없으면 기존과 동일하게 동작하도록 기본값을 뒀다 — 운영 환경에
해당 값을 채워야 실제로 적용된다.
@coderabbitai

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 46f5a3b0-1079-4451-bead-5d7c7c43e40b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unam98
unam98 merged commit 36a402f into mainAug 11, 2026
2 checks passed
@unam98
unam98 deleted the tests/userstamp-redis-security-to-main branch August 11, 2026 07:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@unam98@alh0409