-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from felipehernandez/beta
2.3
- Loading branch information
Showing
19 changed files
with
798 additions
and
47 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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"queues": [ | ||
{ | ||
"name": "test-exchange-single.queue-single-1", | ||
"vhost": "test", | ||
"durable": true, | ||
"auto_delete": false, | ||
"arguments": { | ||
"x-dead-letter-exchange": "DLX", | ||
"x-dead-letter-routing-key": "test-exchange-single.queue-single-1" | ||
} | ||
}, | ||
{ | ||
"name": "test-exchange-multiple.queue-multiple-1", | ||
"vhost": "test", | ||
"durable": true, | ||
"auto_delete": false, | ||
"arguments": { | ||
"x-dead-letter-exchange": "DLX", | ||
"x-dead-letter-routing-key": "test-exchange-multiple.queue-multiple-1" | ||
} | ||
}, | ||
{ | ||
"name": "test-exchange-multiple.queue-multiple-2", | ||
"vhost": "test", | ||
"durable": true, | ||
"auto_delete": false, | ||
"arguments": { | ||
"x-dead-letter-exchange": "DLX", | ||
"x-dead-letter-routing-key": "test-exchange-multiple.queue-multiple-2" | ||
} | ||
} | ||
], | ||
"exchanges": [ | ||
{ | ||
"name": "test-exchange-single", | ||
"vhost": "test", | ||
"type": "topic", | ||
"durable": true, | ||
"auto_delete": false, | ||
"internal": false, | ||
"arguments": {} | ||
}, | ||
{ | ||
"name": "test-exchange-multiple", | ||
"vhost": "test", | ||
"type": "topic", | ||
"durable": true, | ||
"auto_delete": false, | ||
"internal": false, | ||
"arguments": {} | ||
} | ||
], | ||
"bindings": [ | ||
{ | ||
"source": "test-exchange-single", | ||
"vhost": "test", | ||
"destination": "test-exchange-single.queue-single-1", | ||
"destination_type": "queue", | ||
"routing_key": "#", | ||
"arguments": {} | ||
}, | ||
{ | ||
"source": "test-exchange-multiple", | ||
"vhost": "test", | ||
"destination": "test-exchange-multiple.queue-multiple-1", | ||
"destination_type": "queue", | ||
"routing_key": "#", | ||
"arguments": {} | ||
}, | ||
{ | ||
"source": "test-exchange-multiple", | ||
"vhost": "test", | ||
"destination": "test-exchange-multiple.queue-multiple-2", | ||
"destination_type": "queue", | ||
"routing_key": "#", | ||
"arguments": {} | ||
} | ||
] | ||
} |
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 @@ | ||
management.load_definitions = /etc/rabbitmq/definitions.json |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.9-slim | ||
FROM python:3.10-slim | ||
|
||
WORKDIR / | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: RabbitMQ Test | ||
description: Dummy Test for RabbitMQ Stage | ||
tags: | ||
- dummy | ||
- rabbitmq | ||
|
||
stages: | ||
- name: setup | ||
action: | ||
type: VOID | ||
save: | ||
host: rabbitmq | ||
# host: localhost | ||
port: 5672 | ||
vhost: test | ||
|
||
- name: publish message | ||
action: | ||
type: RABBITMQ | ||
method: PUBLISH | ||
host: ${host} | ||
port: ${port} | ||
vhost: ${vhost} | ||
exchange: test-exchange-single | ||
message: hello world | ||
log: | ||
- 'Elapsed time: ${elapsed_time}' | ||
|
||
- name: subscribe | ||
action: | ||
type: RABBITMQ | ||
method: SUBSCRIBE | ||
host: ${host} | ||
port: ${port} | ||
vhost: ${vhost} | ||
queue: test-exchange-single.queue-single-1 | ||
ack: True | ||
log: | ||
- 'Queue: ${queue}' | ||
- 'Message: ${message}' | ||
- 'Ack-ed: ${ack-ed}' | ||
assert: | ||
- ${message} == 'hello world' |
59 changes: 59 additions & 0 deletions
59
example/test/module/rabbitmq/test_multiple_queues_rabbitmq.yaml
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,59 @@ | ||
name: RabbitMQ multiple queues Test | ||
description: Test for RabbitMQ Stage publishing to 1 and subscribing to multiple | ||
tags: | ||
- dummy | ||
- rabbitmq | ||
|
||
stages: | ||
- name: setup | ||
action: | ||
type: VOID | ||
save: | ||
host: rabbitmq | ||
# host: localhost | ||
port: 5672 | ||
vhost: test | ||
|
||
- name: publish message | ||
action: | ||
type: RABBITMQ | ||
method: PUBLISH | ||
host: ${host} | ||
port: ${port} | ||
vhost: ${vhost} | ||
exchange: test-exchange-multiple | ||
message: hello world | ||
log: | ||
- 'Elapsed time: ${elapsed_time}' | ||
|
||
- name: subscribe 1 | ||
action: | ||
type: RABBITMQ | ||
method: SUBSCRIBE | ||
host: ${host} | ||
port: ${port} | ||
vhost: ${vhost} | ||
queue: test-exchange-multiple.queue-multiple-1 | ||
ack: True | ||
log: | ||
- 'Queue: ${queue}' | ||
- 'Message: ${message}' | ||
- 'Ack-ed: ${ack-ed}' | ||
assert: | ||
- ${message} == 'hello world' | ||
|
||
- name: subscribe 2 | ||
action: | ||
type: RABBITMQ | ||
method: SUBSCRIBE | ||
host: ${host} | ||
port: ${port} | ||
vhost: ${vhost} | ||
queue: test-exchange-multiple.queue-multiple-2 | ||
ack: True | ||
log: | ||
- 'Queue: ${queue}' | ||
- 'Message: ${message}' | ||
- 'Ack-ed: ${ack-ed}' | ||
assert: | ||
- ${message} == 'hello world' |
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 @@ | ||
from folker.load.schemas import ActionSchema | ||
from folker.module.rabbitmq.schema import RabbitMQActionSchema | ||
|
||
ActionSchema.type_schemas['RABBITMQ'] = RabbitMQActionSchema |
Oops, something went wrong.