diff options
author | Tibor Frank <tifrank@cisco.com> | 2017-06-08 14:45:26 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2017-06-13 09:00:09 +0200 |
commit | 53d69321e41aa6fd94abc16c7050314dc2e53f08 (patch) | |
tree | 21977de9cc93e53eb2625224262e583a3476bc91 /tests/func/l2bd | |
parent | 5f6802ba1d16005e7562f0eace81512dddab6762 (diff) |
CSIT-664: Refactor setups and teardowns
- Add suite setup for performance IPSec tests
- Add test teardown for performance SNAT tests
- Add setups and teardowns for functional tests
- Clean up the code
Change-Id: Ia456e9f3ff0f0f2bb9a03f692f27c7f9a2817621
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'tests/func/l2bd')
5 files changed, 119 insertions, 130 deletions
diff --git a/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot b/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot index e15f080577..b6a945865f 100644 --- a/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot +++ b/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot @@ -59,22 +59,22 @@ | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} | | And Set interfaces in 2-node circular topology up | | When Configure vhost interfaces for L2BD forwarding | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} +| | ... | ${sock1} +| | ... | ${sock2} | | And Create bridge domain | ${dut_node} | ${bd_id1} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Add interface to bridge domain | ${dut_node} | ${vhost_if1} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Create bridge domain | ${dut_node} | ${bd_id2} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Add interface to bridge domain | ${dut_node} | ${vhost_if2} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} +| | ... | ${sock2} +| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2} | TC02: DUT with two L2BDs (MAC learn) switches ICMPv6 between TG and VM links | | [Documentation] @@ -92,19 +92,19 @@ | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} | | And Set interfaces in 2-node circular topology up | | When Configure vhost interfaces for L2BD forwarding | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} +| | ... | ${sock1} +| | ... | ${sock2} | | And Create bridge domain | ${dut_node} | ${bd_id1} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Add interface to bridge domain | ${dut_node} | ${vhost_if1} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Create bridge domain | ${dut_node} | ${bd_id2} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Add interface to bridge domain | ${dut_node} | ${vhost_if2} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} +| | ... | ${sock2} +| | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2} diff --git a/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot b/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot index 4d201004af..93367d459c 100644 --- a/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot +++ b/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot @@ -60,11 +60,11 @@ | | And Set interfaces in 2-node circular topology up | | When Create bridge domain | ${dut_node} | ${bd_id1} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id1} -| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} +| | ... | ${bd_id1} +| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2} | TC03: DUT1 and DUT2 with L2BD (MAC learning) switch between two TG links | | [Documentation] @@ -78,13 +78,13 @@ | | And Set interfaces in 3-node circular topology up | | When Create bridge domain | ${dut1_node} | ${bd_id1} | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Create bridge domain | ${dut2_node} | ${bd_id2} | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${bd_id2} -| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} +| | ... | ${bd_id2} +| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot b/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot index 88d3260e1e..951d522baa 100644 --- a/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot +++ b/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot @@ -59,44 +59,42 @@ | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} | | And Set interfaces in 2-node circular topology up | | When Configure vhost interfaces for L2BD forwarding | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} +| | ... | ${sock1} | ${sock2} | | And Create bridge domain | ${dut_node} | ${bd_id1} -| | ... | learn=${FALSE} +| | ... | learn=${FALSE} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Add interface to bridge domain | ${dut_node} | ${vhost_if1} -| | ... | ${bd_id1} +| | ... | ${bd_id1} +| | And Add interface to bridge domain | ${dut_node} | ${vhost_if1} | ${bd_id1} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${dut_node} -| | ... | ${dut_to_tg_if1} -| | ... | ${bd_id1} +| | ... | ${tg_to_dut_if1} +| | ... | ${dut_node} +| | ... | ${dut_to_tg_if1} +| | ... | ${bd_id1} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut_if2} -| | ... | ${dut_node} -| | ... | ${vhost_if1} -| | ... | ${bd_id1} +| | ... | ${tg_to_dut_if2} +| | ... | ${dut_node} +| | ... | ${vhost_if1} +| | ... | ${bd_id1} | | And Create bridge domain | ${dut_node} | ${bd_id2} -| | ... | learn=${FALSE} +| | ... | learn=${FALSE} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Add interface to bridge domain | ${dut_node} | ${vhost_if2} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut_if2} -| | ... | ${dut_node} -| | ... | ${dut_to_tg_if2} -| | ... | ${bd_id2} +| | ... | ${tg_to_dut_if2} +| | ... | ${dut_node} +| | ... | ${dut_to_tg_if2} +| | ... | ${bd_id2} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${dut_node} -| | ... | ${vhost_if2} -| | ... | ${bd_id2} +| | ... | ${tg_to_dut_if1} +| | ... | ${dut_node} +| | ... | ${vhost_if2} +| | ... | ${bd_id2} | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} +| | ... | ${sock2} +| | Then Send ICMPv4 bidirectionally and verify received packets +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} | TC02: DUT with two L2BDs (static MACs) switches ICMPv6 between TG and VM links | | [Documentation] @@ -114,41 +112,40 @@ | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} | | And Set interfaces in 2-node circular topology up | | When Configure vhost interfaces for L2BD forwarding | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} +| | ... | ${sock1} +| | ... | ${sock2} | | And Create bridge domain | ${dut_node} | ${bd_id1} -| | ... | learn=${FALSE} +| | ... | learn=${FALSE} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Add interface to bridge domain | ${dut_node} | ${vhost_if1} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${dut_node} -| | ... | ${dut_to_tg_if1} -| | ... | ${bd_id1} +| | ... | ${tg_to_dut_if1} +| | ... | ${dut_node} +| | ... | ${dut_to_tg_if1} +| | ... | ${bd_id1} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut_if2} -| | ... | ${dut_node} -| | ... | ${vhost_if1} -| | ... | ${bd_id1} +| | ... | ${tg_to_dut_if2} +| | ... | ${dut_node} +| | ... | ${vhost_if1} +| | ... | ${bd_id1} | | And Create bridge domain | ${dut_node} | ${bd_id2} -| | ... | learn=${FALSE} +| | ... | learn=${FALSE} | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id2} -| | And Add interface to bridge domain | ${dut_node} | ${vhost_if2} -| | ... | ${bd_id2} +| | ... | ${bd_id2} +| | And Add interface to bridge domain | ${dut_node} | ${vhost_if2} | ${bd_id2} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut_if2} -| | ... | ${dut_node} -| | ... | ${dut_to_tg_if2} -| | ... | ${bd_id2} +| | ... | ${tg_to_dut_if2} +| | ... | ${dut_node} +| | ... | ${dut_to_tg_if2} +| | ... | ${bd_id2} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${dut_node} -| | ... | ${vhost_if2} -| | ... | ${bd_id2} +| | ... | ${tg_to_dut_if1} +| | ... | ${dut_node} +| | ... | ${vhost_if2} +| | ... | ${bd_id2} | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} +| | ... | ${sock2} +| | Then Send ICMPv6 bidirectionally and verify received packets +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} diff --git a/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot b/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot index 2cfa02ae99..7ba6b46591 100644 --- a/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot +++ b/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot @@ -50,37 +50,36 @@ | | Given Configure path in 3-node circular topology | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} | | And Set interfaces in 3-node circular topology up -| | When Create bridge domain | ${dut1_node} | ${bd_id1} -| | ... | learn=${FALSE} +| | When Create bridge domain | ${dut1_node} | ${bd_id1} | learn=${FALSE} | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut1} -| | ... | ${dut1_node} -| | ... | ${dut1_to_tg} -| | ... | ${bd_id1} +| | ... | ${tg_to_dut1} +| | ... | ${dut1_node} +| | ... | ${dut1_to_tg} +| | ... | ${bd_id1} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut2} -| | ... | ${dut1_node} -| | ... | ${dut1_to_dut2} -| | ... | ${bd_id1} +| | ... | ${tg_to_dut2} +| | ... | ${dut1_node} +| | ... | ${dut1_to_dut2} +| | ... | ${bd_id1} | | And Create bridge domain | ${dut2_node} | ${bd_id2} -| | ... | learn=${FALSE} +| | ... | learn=${FALSE} | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut1} -| | ... | ${dut2_node} -| | ... | ${dut2_to_dut1} -| | ... | ${bd_id2} +| | ... | ${tg_to_dut1} +| | ... | ${dut2_node} +| | ... | ${dut2_to_dut1} +| | ... | ${bd_id2} | | And Add destination port to L2FIB | ${tg_node} -| | ... | ${tg_to_dut2} -| | ... | ${dut2_node} -| | ... | ${dut2_to_tg} -| | ... | ${bd_id2} +| | ... | ${tg_to_dut2} +| | ... | ${dut2_node} +| | ... | ${dut2_to_tg} +| | ... | ${bd_id2} | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} +| | ... | ${tg_to_dut2} diff --git a/tests/func/l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot b/tests/func/l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot index 2136394cf5..3649f928c5 100644 --- a/tests/func/l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot +++ b/tests/func/l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot @@ -54,40 +54,33 @@ | | ... | isolated interfaces. [Ref] | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | | Given Configure path for 3-node BD-SHG test | ${nodes['TG']} -| | ... | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} +| | ... | ${nodes['DUT1']} | ${nodes['DUT2']} | | And Set interfaces in 3-node BD-SHG test up | | When Create bridge domain | ${dut1_node} | ${bd_id1} | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if1} -| | ... | ${bd_id1} | ${shg1} +| | ... | ${bd_id1} | ${shg1} | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} -| | ... | ${bd_id1} | ${shg1} +| | ... | ${bd_id1} | ${shg1} | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} +| | ... | ${bd_id1} | | And Create bridge domain | ${dut2_node} | ${bd_id2} | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if1} -| | ... | ${bd_id2} | ${shg2} +| | ... | ${bd_id2} | ${shg2} | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} -| | ... | ${bd_id2} | ${shg2} +| | ... | ${bd_id2} | ${shg2} | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${bd_id2} +| | ... | ${bd_id2} | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} -| | ... | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut2_if1} +| | ... | ${tg_to_dut1_if1} | ${tg_to_dut2_if1} | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} -| | ... | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut2_if2} +| | ... | ${tg_to_dut1_if1} | ${tg_to_dut2_if2} | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} -| | ... | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut2_if1} +| | ... | ${tg_to_dut1_if2} | ${tg_to_dut2_if1} | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} -| | ... | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut2_if2} +| | ... | ${tg_to_dut1_if2} | ${tg_to_dut2_if2} | | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send ICMPv4 bidirectionally and verify received packets -| | | ... | ${tg_node} | ${tg_to_dut1_if1} -| | | ... | ${tg_to_dut1_if2} +| | ... | Send ICMPv4 bidirectionally and verify received packets +| | | ... | ${tg_node} | ${tg_to_dut1_if1} | ${tg_to_dut1_if2} | | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send ICMPv4 bidirectionally and verify received packets -| | | ... | ${tg_node} | ${tg_to_dut2_if1} -| | | ... | ${tg_to_dut2_if2} +| | ... | Send ICMPv4 bidirectionally and verify received packets +| | | ... | ${tg_node} | ${tg_to_dut2_if1} | ${tg_to_dut2_if2} |