From ca0f45276a0f16b86256645356ac4b65d6a4a094 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Fri, 28 Feb 2025 16:36:31 +0100 Subject: [PATCH] Add East-West traffic background iperf3 test This patch adds east-west traffic test using iperf3 client and server running in background. When test will be run first time, it will simply make sure that iperf3 client and server are run in the VMs. In the following runs it will check if iperf3 client is running, if yes, stops it, checks log file and starts it again. Closes: #TOBIKO-129 Change-Id: I2f51e28f5fd06bceb845f1bf4bdff79ceaa3767a --- tobiko/tests/scenario/neutron/test_network.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tobiko/tests/scenario/neutron/test_network.py b/tobiko/tests/scenario/neutron/test_network.py index fe119b271..8de3098b5 100644 --- a/tobiko/tests/scenario/neutron/test_network.py +++ b/tobiko/tests/scenario/neutron/test_network.py @@ -66,6 +66,8 @@ class NetworkTest(BaseNetworkTest): @pytest.mark.background class BackgroundProcessTest(BaseNetworkTest): + stack = tobiko.required_fixture(stacks.AdvancedPeerServerStackFixture) + def test_check_background_vm_ping(self): """ Tests that are designed to run in the background , then collect results. @@ -76,6 +78,22 @@ class BackgroundProcessTest(BaseNetworkTest): topology.get_openstack_topology().check_or_start_background_vm_ping( self.stack.peer_stack.floating_ip_address) + def test_east_west_tcp_traffic_background_iperf(self): + """ Test East-West TCP traffic in the existing flow. + + This test is intended to test TCP traffic with bigger amount of + data send between two VMs connected to the same tenant network. + Traffic is send in the single flow using "iperf" tool. + """ + + topology.get_openstack_topology().\ + check_or_start_background_iperf_connection( + self.stack.fixed_ipv4, + port=5203, + protocol='tcp', + ssh_client=self.stack.peer_stack.ssh_client, + iperf3_server_ssh_client=self.stack.ssh_client) + @pytest.mark.migrate_server class SameHostNetworkTest(NetworkTest):