FIX : Docker Engine 29 에서 통합 테스트가 조용히 skip 되던 문제 - #109
Merged
Merged
Conversation
로컬(Windows + Docker Desktop, Engine 29)에서 Docker 가 켜져 있어도
FlywaySchemaValidationTest, CareCodeMariaDbIntegrationTest 가 skip 됐다.
스키마 정합성 검증이 로컬에서 한 번도 돌지 않았다는 뜻이다.
원인을 좁혔다.
docker -H npipe://... version, API 1.32 → 실패 (빈 /info 를 400)
docker -H npipe://... version, API 1.40 → 29.5.3
docker -H npipe://... version, API 1.44 → 29.5.3
Testcontainers 가 쓰는 docker-java 는 API 버전을 따로 주지 않으면 1.32 로 고정한다.
Engine 29 는 최소 API 가 1.40 이라 이 요청을 거부하고, Testcontainers 는 이를
"Docker 를 찾지 못함" 으로 판단해 disabledWithoutDocker 로 건너뛴다.
Testcontainers 를 1.21.4, 2.0.5 로 올려도 같았다.
테스트 태스크에 api.version=1.44 를 넘긴다. 의존성은 그대로다. 1.44 는 Engine 25 이상이
지원하므로 CI 에도 안전하다. -Papi.version= 으로 덮어쓸 수 있다.
CI 도 같은 문제를 안고 있었다. 지금 통과하는 건 러너가 아직 이전 Engine 이기 때문이고,
러너가 올라가면 "Assert schema validation actually ran" 단계가 빌드를 실패시켰을 것이다.
로컬에서도 skip 을 알린다. CI 처럼 실패시키지는 않고(Docker 없이도 나머지 테스트는
돌아야 한다) 테스트 끝에 경고를 띄운다. api.version=1.32 로 일부러 재현해 경고가 뜨는 것까지 확인했다.
결과: 로컬에서 486 tests, 0 failures, 0 skipped. 이 세션에서 머지한 변경 전체가
처음으로 로컬에서 Flyway 마이그레이션·엔티티 정합성 검증을 통과했다.
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.
🏫 관련 이슈
Closes #92
🏫 PR 타입
🏫 반영 브랜치
chore/testcontainers-docker29->main🏫 변경 사항
로컬(Windows + Docker Desktop, Engine 29)에서 Docker 가 켜져 있어도 Testcontainers 통합 테스트가
skip 됐다. 스키마 정합성 검증이 로컬에서 한 번도 돌지 않은 채 초록불이 떴다.
원인
Testcontainers 가 쓰는 docker-java 는 API 버전을 따로 주지 않으면 1.32 로 고정한다.
Engine 29 는 최소 API 가 1.40 이라 거부하고, Testcontainers 는 이를 "Docker 를 찾지 못함" 으로 판단해
disabledWithoutDocker로 건너뛴다.api.version=1.44라이브러리 버전 문제가 아니라 API 버전 기본값 문제라, 의존성은 그대로 두고 테스트 태스크에 속성 한 줄을 넘긴다.
1.44 는 Engine 25 이상이 지원하므로 CI 에도 안전하다.
-Papi.version=으로 덮어쓸 수 있다.지금 CI 가 통과하는 건 러너가 아직 이전 Engine 이기 때문이다. 러너가 29 로 올라가면
Assert schema validation actually ran단계가 모든 PR 을 실패시켰을 것이다. 이 PR 로 미리 막힌다.로컬에서도 skip 을 알린다
로컬은 실패시키지 않는다 — Docker 없이도 나머지 테스트는 돌아야 한다. 대신 테스트 끝에 경고를 띄운다.
-Papi.version=1.32로 일부러 재현해 경고가 뜨는 것까지 확인했다.🏫 테스트 결과
FlywaySchemaValidationTest(3),CareCodeMariaDbIntegrationTest(2)가 로컬에서 처음으로 실제로 돌았다.이 세션에서 머지한 변경 전체(#80 ~ #108)가 로컬에서도 Flyway 마이그레이션·엔티티 정합성 검증을 통과했다는 뜻이다.