Skip to content

Commit 3b59d86

Browse files
committed
chore: update RabbitMQ container setup and logging in tests
- Add `4369/tcp` port for epmd in RabbitMQ container setup - Remove `15672/tcp` port for the management plugin in RabbitMQ container setup - Rename `natsC` to `rabbitMQC` in `TestShutdownWorkFlow` - Update log message to include "RabbitMQ endpoint:" in `TestShutdownWorkFlow` Signed-off-by: appleboy <[email protected]>
1 parent dfe149e commit 3b59d86

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rabbitmq_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func setupRabbitMQContainer(ctx context.Context, t *testing.T) (testcontainers.C
3636
req := testcontainers.ContainerRequest{
3737
Image: "rabbitmq:3-management",
3838
ExposedPorts: []string{
39-
"5672/tcp", // amqp
40-
"15672/tcp", // management plugin
39+
"4369/tcp", // epmd
40+
"5672/tcp", // amqp
4141
},
4242
WaitingFor: wait.ForListeningPort("5672/tcp"),
4343
Env: map[string]string{
@@ -59,9 +59,9 @@ func setupRabbitMQContainer(ctx context.Context, t *testing.T) (testcontainers.C
5959

6060
func TestShutdownWorkFlow(t *testing.T) {
6161
ctx := context.Background()
62-
natsC, endpoint := setupRabbitMQContainer(ctx, t)
63-
defer testcontainers.CleanupContainer(t, natsC)
64-
log.Println(endpoint)
62+
rabbitMQC, endpoint := setupRabbitMQContainer(ctx, t)
63+
defer testcontainers.CleanupContainer(t, rabbitMQC)
64+
log.Println("RabbitMQ endpoint:", endpoint)
6565
w := NewWorker(
6666
WithQueue("test"),
6767
WithAddr(fmt.Sprintf("amqp://guest:guest@%s/", endpoint)),

0 commit comments

Comments
 (0)