Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ddsrouter_test/compose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# Name of files to test
set(TESTS
repeater
repeater_tcp
tcp
udp
discovery_server
Expand Down
106 changes: 106 additions & 0 deletions ddsrouter_test/compose/repeater_tcp/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Test description:
# This test checks the TCP and repeater functionality by creating 3 routers, 2 edges and 1 cloud.
# This test aims to simulate the scenario in which one DDS Router in the Cloud has a single network address exposed
# and accessible for incoming connections. Thus all DDS Routers deployed on the edge, or in other networks, will use
# this unique address as the connection address.
#
# Test architecture:
#
# ┌────────────────────────────────────────────────────────────────┐
# │ cloud_edge_net │
# │ │
# │ ┌──────────────────┐ │
# │ │ ddsrouter_cloud │ │
# │ │ (wan [repeater]) │ │
# │ └─▲──────────────▲─┘ │
# │ │ │ │
# │ ┌──────────────┘ └─────────┐ │
# ┌──────┼───────────┼──────────────────┐ ┌───────────┼────────────┼──────┐
# │ │ │ │ │ │ │ │
# │ │ ┌─────────▼────────┐ │ │ ┌───────▼──────────┐ │ │
# │ │ │ ddsrouter_edge_1 │ │ │ │ ddsrouter_edge_2 │ │ │
# │ │ │ (local + wan) │ │ │ │ (local + wan) │ │ │
# │ │ └───────┬────▲─────┘ │ │ └───────┬──────────┘ │ │
# │ │ │ │ │ │ │ │ │
# │ └─────────┼────┼───────────────┼────────┼───────────┼────────────┘ │
# │ │ │ │ │ │ │
# │ ┌─────────────▼┐ ┌┴───────────┐ │ │ ┌──────▼───────┐ │
# │ │ sub_edge_1 │ │ pub_edge_1 │ │ │ │ sub_edge_2 │ │
# │ │ (subscriber) │ │ (publisher)│ │ │ │ (subscriber) │ │
# │ └──────────────┘ └────────────┘ │ │ └──────────────┘ │
# │ │ │ │
# │ edge_1_net (domain 1) │ │ edge_2_net (domain 2) │
# └─────────────────────────────────────┘ └───────────────────────────────┘

services:

ddsrouter_cloud:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_cloud
networks:
- cloud_edge_net
volumes:
- ./ddsrouter_cloud.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 10

ddsrouter_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_edge_1
depends_on:
- ddsrouter_cloud
networks:
- cloud_edge_net
- edge_1_net
volumes:
- ./ddsrouter_edge_1.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 10

pub_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: pub_edge_1
depends_on:
- ddsrouter_edge_1
networks:
- edge_1_net
command: install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample publisher -i 250 -s 30 -d 1

sub_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: sub_edge_1
depends_on:
- ddsrouter_edge_1
networks:
- edge_1_net
volumes:
- ../execute_and_validate_subscriber.py:/execute_and_validate_subscriber.py
command: python3 /execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 10 --timeout 10 --domain 1

ddsrouter_edge_2:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_edge_2
depends_on:
- ddsrouter_cloud
networks:
- cloud_edge_net
- edge_2_net
volumes:
- ./ddsrouter_edge_2.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 10

sub_edge_2:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: sub_edge_2
depends_on:
- ddsrouter_edge_2
networks:
- edge_2_net
volumes:
- ../execute_and_validate_subscriber.py:/execute_and_validate_subscriber.py
command: python3 /execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 10 --timeout 10 --domain 2

networks:
edge_1_net:
edge_2_net:
cloud_edge_net:
default:
driver: none
14 changes: 14 additions & 0 deletions ddsrouter_test/compose/repeater_tcp/ddsrouter_cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: v3.0

participants:

- name: EchoParticipant
kind: echo

- name: Cloud_Participant_1
kind: wan
repeater: true
listening-addresses:
- domain: ddsrouter_cloud
port: 11666
transport: tcp
17 changes: 17 additions & 0 deletions ddsrouter_test/compose/repeater_tcp/ddsrouter_edge_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: v3.0

participants:

- name: EchoParticipant
kind: echo

- name: Simple_Participant
kind: local
domain: 1

- name: Edge_1_Participant
kind: wan
connection-addresses:
- domain: ddsrouter_cloud
port: 11666
transport: tcp
17 changes: 17 additions & 0 deletions ddsrouter_test/compose/repeater_tcp/ddsrouter_edge_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: v3.0

participants:

- name: EchoParticipant
kind: echo

- name: Simple_Participant
kind: local
domain: 2

- name: Edge_2_Participant
kind: wan
connection-addresses:
- domain: ddsrouter_cloud
port: 11666
transport: tcp