Skip to content

[Test] ProductImage API Test#238

Merged
isak-kang merged 1 commit into
developfrom
test/#201-product-image-api
Oct 29, 2025
Merged

[Test] ProductImage API Test#238
isak-kang merged 1 commit into
developfrom
test/#201-product-image-api

Conversation

@growingpsy

@growingpsy growingpsy commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

🛠️ Issue Number

closes #201

📌 작업 내용 및 특이사항

ProductImage(상품 이미지) API 구현

  • 상품 이미지 등록 API (POST /product-images)
  • 상품 이미지 조회 API (GET /product-images/products/{productId})
  • 상품 이미지 수정 API (PATCH /product-images/{imageId})
  • 상품 이미지 삭제 API (DELETE /product-images/{imageId})

단일 상품 다중 이미지 업로드 구현 (대표 이미지 중복 방지 로직 포함)
파일명 정규화 및 UUID 기반 저장 (FileStorageService 적용)
FileProperties 추가 및 PropertiesConfig에 반영

📚 참고사항

  • 로컬 파일 시스템 저장 기준으로 구현 (추후 S3 전환 고려)
  • 향후 Product 삭제 시 연관 이미지 일괄 삭제 로직 추가 예정

- 상품 이미지 업로드, 조회, 삭제, 대표 이미지 변경 API 테스트 구현
- REST Docs 스니펫(path-parameters, request-parts, response-fields) 생성
- DiscountControllerTest 스타일에 맞춰 응답 데이터 없는 API는 요청만 문서화
- TestConfig, SecurityTestConfig 적용하여 MockMvc 기반 테스트 환경 구성
@growingpsy growingpsy self-assigned this Oct 28, 2025
@growingpsy growingpsy added the ✅ test 테스트를 작성, 또는 수정합니다. label Oct 28, 2025
@growingpsy growingpsy added this to the Sprint 3 milestone Oct 28, 2025

@isak-kang isak-kang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

고생하셨습니다!

@isak-kang
isak-kang merged commit ddb52e8 into develop Oct 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ test 테스트를 작성, 또는 수정합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Test] ProductImage API 테스트

2 participants