Skip to content
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

Merged
merged 2 commits into from
Jan 14, 2023

Conversation

f-lab-lion
Copy link
Collaborator

@github-actions
Copy link

github-actions bot commented Jan 14, 2023

Unit Test Results

50 tests  ±0   50 ✔️ ±0   3s ⏱️ -1s
16 suites ±0     0 💤 ±0 
16 files   ±0     0 ±0 

Results for commit 73f8b8a. ± Comparison against base commit c4bc6de.

♻️ This comment has been updated with latest results.

@@ -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
Copy link
Collaborator Author

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")
Copy link
Collaborator Author

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

로컬테스트에서는 이미 로컬에 셋팅된 환경을 사용하기에 스키마를 따로 실행해 줄 필요가 없음.

@f-lab-lion f-lab-lion linked an issue Jan 14, 2023 that may be closed by this pull request
@f-lab-lion
Copy link
Collaborator Author

@vymr1000
참고부탁드려요~

@f-lab-lion f-lab-lion merged commit e05155e into develop Jan 14, 2023
@f-lab-lion f-lab-lion self-assigned this Jan 14, 2023
@vymr1000 vymr1000 deleted the feature/#104-local-docker-compose branch January 19, 2023 12:32
Sign up for free to 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.

[BUG] 로컬에서 docker compose 실행안됨
1 participant