[chore/#125] 테스트 컨테이너 관리를 TestContainers 대신 Spring Bean으로 변경 #126
+56
−13
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.
❤️ 기능 설명
테스트 환경 개선을 위해 Testcontainers 설정을 Spring Bean 방식으로 리팩토링하고, 의존성을 최신화했습니다.
주요 변경사항
Testcontainers Bean 설정 클래스 생성
MySQLTestConfig: MySQL 테스트 컨테이너 Bean 설정ElasticsearchTestConfig: Elasticsearch 테스트 컨테이너 Bean 설정 (신규 추가)RedisTestConfig: Redis 테스트 컨테이너 Bean 설정 (신규 추가)의존성 버전 업그레이드
testcontainers:mysql: 1.19.3 → 1.21.4testcontainers:junit-jupiter: 1.19.3 → 1.21.4testcontainers:elasticsearch: 1.21.4 (신규 추가)com.redis:testcontainers-redis: 2.2.4 (신규 추가)통합 테스트 리팩토링
PostControllerIntegrationTest에서@Import(MySQLTestConfig.class)방식으로 변경@Testcontainers,@Container어노테이션 제거개선 효과
@ServiceConnection을 통한 자동 설정 활용연결된 issue
연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #125
🩷 Approve 하기 전 확인해주세요!
✅ 체크리스트