Skip to content

Commit

Permalink
chore: 테스트 redis에서 비밀번호 관련 설정 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
seongjae6751 committed Sep 15, 2024
1 parent e319625 commit 88c738a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/test/java/in/koreatech/koin/AcceptanceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ private static void configureProperties(final DynamicPropertyRegistry registry)
registry.add("spring.datasource.password", () -> ROOT_PASSWORD);
registry.add("spring.data.redis.host", redisContainer::getHost);
registry.add("spring.data.redis.port", () -> redisContainer.getMappedPort(6379).toString());
registry.add("spring.data.redis.password", () ->
System.getenv().getOrDefault("REDIS_PASSWORD", ""));
registry.add("spring.data.mongodb.host", mongoContainer::getHost);
registry.add("spring.data.mongodb.port", () -> mongoContainer.getMappedPort(27017).toString());
registry.add("spring.data.mongodb.database", () -> "test");
Expand All @@ -106,8 +104,7 @@ private static void configureProperties(final DynamicPropertyRegistry registry)

redisContainer = new GenericContainer<>(
DockerImageName.parse("redis:7.0.9"))
.withExposedPorts(6379)
.withEnv("REDIS_PASSWORD", System.getenv().getOrDefault("REDIS_PASSWORD", ""));
.withExposedPorts(6379);

mongoContainer = new GenericContainer<>(
DockerImageName.parse("mongo:6.0.14"))
Expand Down
6 changes: 2 additions & 4 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,14 @@ spring:

data:
redis:
host: localhost
port: 6379
password: ""
repositories:
enabled: true
keyspace-events: ON_STARTUP

server:
tomcat:
max-http-form-post-size: 10MB
# MockMvc이용하면 한글 깨지는 문제 해결하는 설정
# MockMvc이용하면 한글 깨지는 문제 해결하는 설정
servlet:
encoding:
force-response: true
Expand All @@ -58,6 +55,7 @@ swagger:
slack:
koin_event_notify_url: https://slack-weehookurl.com
koin_owner_event_notify_url: https://slack-weehookurl.com
koin_shop_review_notify_url: https://slack-weehookurl.com
logging:
error: https://slack-weehookurl.com

Expand Down

0 comments on commit 88c738a

Please sign in to comment.