Skip to content

Commit

Permalink
[WHD-255] Fix: Setup test context without redis
Browse files Browse the repository at this point in the history
  • Loading branch information
jjunhub committed Dec 2, 2024
1 parent 4057311 commit 527ff78
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ dependencies {
implementation 'io.sentry:sentry-spring-boot-starter-jakarta:7.15.0'

// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.redisson:redisson-spring-boot-starter:3.39.0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Profile("!test")
@Configuration
public class RedissonConfig {

Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/application-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@ spring:
jpa:
hibernate:
ddl-auto: update
---
spring:
config:
activate:
on-profile: redis-test

data:
redis:
host: dummy
port: 6379
---
spring:
config:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spring:
profiles:
default: dev
group:
test: h2-test, payment-test, s3-test
test: h2-test, payment-test, s3-test, redis-test
dev: mysql-dev, payment-portone, payment-nh, sentry-dev, redis-dev
prod: mysql-prod, payment-portone, payment-nh, sentry-prod, redis-prod

Expand Down

0 comments on commit 527ff78

Please sign in to comment.