-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabled Rabbit Streams by adding ability to expose additional ports (#…
…2234) * Enabled Rabbit Streams by adding ability to expose additional ports * Convert properties to YAML
- Loading branch information
Showing
11 changed files
with
102 additions
and
9 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
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
32 changes: 32 additions & 0 deletions
32
...rc/test/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQAdditionalPortsTest.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,32 @@ | ||
package com.playtika.testcontainer.rabbitmq; | ||
|
||
import com.rabbitmq.stream.Environment; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.test.context.ActiveProfiles; | ||
|
||
@Slf4j | ||
@SpringBootTest( | ||
classes = EmbeddedRabbitMQAdditionalPortsTest.TestConfiguration.class | ||
) | ||
@ActiveProfiles({"enabled", "stream"}) | ||
public class EmbeddedRabbitMQAdditionalPortsTest { | ||
|
||
@EnableAutoConfiguration | ||
@Configuration | ||
static class TestConfiguration { | ||
} | ||
|
||
@Autowired | ||
Environment environment; | ||
|
||
@Test | ||
void streamPortExposed() { | ||
environment.streamCreator().name("stream").create(); | ||
environment.streamExists("stream"); | ||
} | ||
} |
5 changes: 0 additions & 5 deletions
5
embedded-rabbitmq/src/test/resources/application-enabled.properties
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
spring: | ||
rabbitmq: | ||
host: ${embedded.rabbitmq.host} | ||
port: ${embedded.rabbitmq.port} | ||
username: ${embedded.rabbitmq.user} | ||
password: ${embedded.rabbitmq.password} | ||
virtual-host: ${embedded.rabbitmq.vhost} |
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,8 @@ | ||
spring: | ||
rabbitmq: | ||
stream: | ||
host: ${embedded.rabbitmq.host} | ||
port: ${embedded.rabbitmq.additionalPorts.5552} | ||
username: ${embedded.rabbitmq.user} | ||
password: ${embedded.rabbitmq.password} | ||
virtual-host: ${embedded.rabbitmq.vhost} |
1 change: 0 additions & 1 deletion
1
embedded-rabbitmq/src/test/resources/bootstrap-plugins.properties
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
embedded: | ||
rabbitmq: | ||
enabled-plugins: | ||
- rabbitmq_consistent_hash_exchange |
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,6 @@ | ||
embedded: | ||
rabbitmq: | ||
enabled-plugins: | ||
- rabbitmq_stream | ||
additionalPorts: | ||
- 5552 |
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