-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
로컬에서 docker compose 실행안되는현상 수정 #105
Conversation
@@ -1,7 +1,7 @@ | |||
spring: | |||
datasource: | |||
driver-class-name: com.mysql.cj.jdbc.Driver | |||
url: jdbc:mysql://localhost:3306/UA?serverTimezone=UTC&characterEncoding=UTF-8&useSSL=false&allowPublicKeyRetrieval=true | |||
url: jdbc:mysql://localhost:13309/UA?serverTimezone=UTC&characterEncoding=UTF-8&useSSL=false&allowPublicKeyRetrieval=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker compose에서는 13309포트를 사용하는데 접속은 3306으로 시도하고있기에 변경함.
https://github.com/f-lab-edu/unique-auction/blob/develop/docker-compose.yml#L12-L13
import org.springframework.test.context.DynamicPropertyRegistry; | ||
import org.springframework.test.context.DynamicPropertySource; | ||
import org.testcontainers.containers.GenericContainer; | ||
import org.testcontainers.containers.MySQLContainer; | ||
|
||
@Profile("test & !localtest") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localtest
에서는 testContainer
사용하지않는다.
로컬에서 docker compose 등으로 실행해놓은 인프라를 사용한다.
추가적으로 localtest
로 실행시 repository쪽 테스트 모두 실패하는현상 있음
#106 에서 다룸
init: | ||
mode: always | ||
schema-locations: classpath:/schema.sql | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로컬테스트에서는 이미 로컬에 셋팅된 환경을 사용하기에 스키마를 따로 실행해 줄 필요가 없음.
@vymr1000 |
관련된 이슈 번호