-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35bd6fb
commit 38529cc
Showing
5 changed files
with
40 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ jwt: | |
management: | ||
endpoint: | ||
gateway: | ||
enabled: true | ||
access: read_only | ||
endpoints: | ||
web: | ||
exposure: | ||
|
This file contains 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
This file contains 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
33 changes: 33 additions & 0 deletions
33
api-gateway/src/test/java/com/example/api/gateway/config/ContainerConfig.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*** | ||
<p> | ||
Licensed under MIT License Copyright (c) 2024 Raja Kolli. | ||
</p> | ||
***/ | ||
|
||
package com.example.api.gateway.config; | ||
|
||
import com.redis.testcontainers.RedisContainer; | ||
import org.springframework.boot.test.context.TestConfiguration; | ||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; | ||
import org.springframework.context.annotation.Bean; | ||
import org.testcontainers.containers.GenericContainer; | ||
import org.testcontainers.utility.DockerImageName; | ||
|
||
@TestConfiguration(proxyBeanMethods = false) | ||
public class ContainerConfig { | ||
|
||
@Bean | ||
@ServiceConnection(name = "openzipkin/zipkin") | ||
GenericContainer<?> zipkinContainer() { | ||
return new GenericContainer<>(DockerImageName.parse("openzipkin/zipkin:latest")) | ||
.withExposedPorts(9411) | ||
.withReuse(true); | ||
} | ||
|
||
@Bean | ||
@ServiceConnection(name = "redis") | ||
RedisContainer redisContainer() { | ||
return new RedisContainer(DockerImageName.parse("redis").withTag("7.4.1-alpine")) | ||
.withReuse(true); | ||
} | ||
} |