From d9716ad55cf9d1ec63d4297c9b61134a62d5be64 Mon Sep 17 00:00:00 2001 From: selias Date: Wed, 29 Jun 2016 10:38:31 +0200 Subject: [PATCH] Rename Honeycomb test suites - update test suite numbering to be future-proof - reorder suite execution: - persistence suite should always run last - l2_fib suite follows after l2 - VxLAN gpe suite follows after VxLAN - fix issue with interface name vs. index introduced in change #1032 - change ${node} variable to global scope, set in _init_.robot Change-Id: Ib4ca7265586026faab219da9923e7ca312ef2c79 Signed-off-by: selias --- resources/libraries/robot/honeycomb/bridge_domain.robot | 8 +++++--- resources/libraries/robot/honeycomb/interfaces.robot | 5 +++-- ... interface_management.robot => 010_interface_management.robot} | 3 +-- .../{3 - bridge_domain.robot => 020_bridge_domain.robot} | 3 +-- tests/suites/honeycomb/{9 - l2_fib.robot => 021_l2_fib.robot} | 5 ++--- tests/suites/honeycomb/{2 - vxlan.robot => 030_vxlan.robot} | 3 +-- .../suites/honeycomb/{8 - vxlan_gpe.robot => 031_vxlan_gpe.robot} | 3 +-- tests/suites/honeycomb/{4 - tap.robot => 040_tap.robot} | 3 +-- ... interface_vhost_user.robot => 050_interface_vhost_user.robot} | 1 - .../{6 - sub_interface.robot => 060_sub_interface.robot} | 5 ++--- .../honeycomb/{9 - notification.robot => 070_notification.robot} | 3 +-- .../honeycomb/{7 - persistence.robot => 900_persistence.robot} | 3 +-- tests/suites/honeycomb/__init__.robot | 4 +++- 13 files changed, 22 insertions(+), 27 deletions(-) rename tests/suites/honeycomb/{1 - interface_management.robot => 010_interface_management.robot} (98%) rename tests/suites/honeycomb/{3 - bridge_domain.robot => 020_bridge_domain.robot} (98%) rename tests/suites/honeycomb/{9 - l2_fib.robot => 021_l2_fib.robot} (98%) rename tests/suites/honeycomb/{2 - vxlan.robot => 030_vxlan.robot} (98%) rename tests/suites/honeycomb/{8 - vxlan_gpe.robot => 031_vxlan_gpe.robot} (99%) rename tests/suites/honeycomb/{4 - tap.robot => 040_tap.robot} (97%) rename tests/suites/honeycomb/{5 - interface_vhost_user.robot => 050_interface_vhost_user.robot} (99%) rename tests/suites/honeycomb/{6 - sub_interface.robot => 060_sub_interface.robot} (99%) rename tests/suites/honeycomb/{9 - notification.robot => 070_notification.robot} (97%) rename tests/suites/honeycomb/{7 - persistence.robot => 900_persistence.robot} (96%) diff --git a/resources/libraries/robot/honeycomb/bridge_domain.robot b/resources/libraries/robot/honeycomb/bridge_domain.robot index 76122fa8f9..f8951e6ff1 100644 --- a/resources/libraries/robot/honeycomb/bridge_domain.robot +++ b/resources/libraries/robot/honeycomb/bridge_domain.robot @@ -212,9 +212,11 @@ | | ... | \| GigabitEthernet0/9/0 \| ${{split_horizon_group:2, bvi:False}} \| | | [Arguments] | ${node} | ${index} | ${interface1} | ${interface2} | | ... | ${settings} -| | ${if1_index}= | Get interface sw index | ${node} | ${interface1} -| | ${if2_index}= | Get interface sw index | ${node} | ${interface2} -| | ${if_indices}= | Create list | ${if1_index} | ${if2_index} +| | ${if1_link}= | Get interface by name | ${node} | ${interface1} +| | ${if2_link}= | Get interface by name | ${node} | ${interface2} +| | ${if_indices}= | Create list +| | ... | ${node['interfaces']['${if1_link}']['vpp_sw_index']} +| | ... | ${node['interfaces']['${if2_link}']['vpp_sw_index']} | | ${bd_data}= | VPP get bridge domain data | ${node} | | ${bd_interfaces}= | Set Variable | ${bd_data[${index}]['sw_if']} | | @{bd_interfaces}= | Create List | ${bd_interfaces[0]} | ${bd_interfaces[1]} diff --git a/resources/libraries/robot/honeycomb/interfaces.robot b/resources/libraries/robot/honeycomb/interfaces.robot index ea1d2b090b..8321342d70 100644 --- a/resources/libraries/robot/honeycomb/interfaces.robot +++ b/resources/libraries/robot/honeycomb/interfaces.robot @@ -33,6 +33,7 @@ | | ... | \| up \| | | [Arguments] | ${node} | ${interface} | ${state} | | interfaceCLI.Set interface state | ${node} | ${interface} | ${state} +| | ... | if_type=name | Honeycomb sets interface state | | [Documentation] | Uses Honeycomb API to change the admin state\ @@ -184,9 +185,9 @@ | | Should be equal | ${prefix} | | ... | ${api_data['ietf-ip:ipv4']['address'][0]['prefix-length']} | | Should be equal | ${fib_address} -| | ... | ${api_data['ietf-ip:ipv4']['neighbor'][0]['ip'] +| | ... | ${api_data['ietf-ip:ipv4']['neighbor'][0]['ip']} | | Should be equal | ${fib_mac} -| | ... | ${api_data['ietf-ip:ipv4']['neighbor'][0]['link-layer-address'] +| | ... | ${api_data['ietf-ip:ipv4']['neighbor'][0]['link-layer-address']} | | :FOR | ${key} | IN | @{settings.keys()} | | | Should be equal | | | ... | ${settings['{key']} | ${api_data['ietf-ip:ipv4']['{$key}']} diff --git a/tests/suites/honeycomb/1 - interface_management.robot b/tests/suites/honeycomb/010_interface_management.robot similarity index 98% rename from tests/suites/honeycomb/1 - interface_management.robot rename to tests/suites/honeycomb/010_interface_management.robot index 01be01a6b0..e9798167c7 100644 --- a/tests/suites/honeycomb/1 - interface_management.robot +++ b/tests/suites/honeycomb/010_interface_management.robot @@ -12,8 +12,7 @@ # limitations under the License. *** Variables *** -# Node and interface to run tests on. -| ${node}= | ${nodes['DUT1']} +# Interface to run tests on. | ${interface}= | ${node['interfaces']['port1']['name']} # Configuration which will be set and verified during tests. | ${ipv4_address}= | 192.168.0.2 diff --git a/tests/suites/honeycomb/3 - bridge_domain.robot b/tests/suites/honeycomb/020_bridge_domain.robot similarity index 98% rename from tests/suites/honeycomb/3 - bridge_domain.robot rename to tests/suites/honeycomb/020_bridge_domain.robot index c2986b65b7..0bd4463ea0 100644 --- a/tests/suites/honeycomb/3 - bridge_domain.robot +++ b/tests/suites/honeycomb/020_bridge_domain.robot @@ -12,8 +12,7 @@ # limitations under the License. *** Variables *** -# Node and interfaces to run tests on. -| ${node}= | ${nodes['DUT1']} +# Interfaces to run tests on. | @{interfaces}= | ${node['interfaces']['port1']['name']} | ... | ${node['interfaces']['port3']['name']} # Configuration which will be set and verified during tests. diff --git a/tests/suites/honeycomb/9 - l2_fib.robot b/tests/suites/honeycomb/021_l2_fib.robot similarity index 98% rename from tests/suites/honeycomb/9 - l2_fib.robot rename to tests/suites/honeycomb/021_l2_fib.robot index bc56f4e85c..c994ad3b5b 100644 --- a/tests/suites/honeycomb/9 - l2_fib.robot +++ b/tests/suites/honeycomb/021_l2_fib.robot @@ -26,9 +26,8 @@ | Force tags | honeycomb_sanity *** Variables *** -# Node and interface used in tests. -| ${node}= | ${nodes['DUT1']} -| ${interface}= | GigabitEthernet0/8/0 +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} *** Test Cases *** | Honeycomb adds L2 FIB entry (forward) diff --git a/tests/suites/honeycomb/2 - vxlan.robot b/tests/suites/honeycomb/030_vxlan.robot similarity index 98% rename from tests/suites/honeycomb/2 - vxlan.robot rename to tests/suites/honeycomb/030_vxlan.robot index c49c14c9f8..03a3d71cd5 100644 --- a/tests/suites/honeycomb/2 - vxlan.robot +++ b/tests/suites/honeycomb/030_vxlan.robot @@ -12,8 +12,7 @@ # limitations under the License. *** Variables *** -# Node and interfaces to run tests on. -| ${node}= | ${nodes['DUT1']} +# Interfaces to run tests on. | ${interface}= | ${node['interfaces']['port1']['name']} | ${vx_interface}= | vx_tunnel_test # Configuration which will be set and verified during tests. diff --git a/tests/suites/honeycomb/8 - vxlan_gpe.robot b/tests/suites/honeycomb/031_vxlan_gpe.robot similarity index 99% rename from tests/suites/honeycomb/8 - vxlan_gpe.robot rename to tests/suites/honeycomb/031_vxlan_gpe.robot index 0031a0a92d..ec2ef3a518 100644 --- a/tests/suites/honeycomb/8 - vxlan_gpe.robot +++ b/tests/suites/honeycomb/031_vxlan_gpe.robot @@ -12,8 +12,7 @@ # limitations under the License. *** Variables *** -# Node and interfaces to run tests on. -| ${node}= | ${nodes['DUT1']} +# Interface to run tests on. | ${interface}= | ${node['interfaces']['port1']['name']} # Parameters to be set on existing interface diff --git a/tests/suites/honeycomb/4 - tap.robot b/tests/suites/honeycomb/040_tap.robot similarity index 97% rename from tests/suites/honeycomb/4 - tap.robot rename to tests/suites/honeycomb/040_tap.robot index 4bce990ee8..329ca8a3c1 100644 --- a/tests/suites/honeycomb/4 - tap.robot +++ b/tests/suites/honeycomb/040_tap.robot @@ -12,8 +12,7 @@ # limitations under the License. *** Variables *** -# Node and interfaces to run tests on. -| ${node}= | ${nodes['DUT1']} +# Interfaces to run tests on. | ${interface}= | ${node['interfaces']['port1']['name']} | ${tap_interface}= | tap_test # Configuration which will be set and verified during tests. diff --git a/tests/suites/honeycomb/5 - interface_vhost_user.robot b/tests/suites/honeycomb/050_interface_vhost_user.robot similarity index 99% rename from tests/suites/honeycomb/5 - interface_vhost_user.robot rename to tests/suites/honeycomb/050_interface_vhost_user.robot index bba026ebc4..2c2a5ae91a 100644 --- a/tests/suites/honeycomb/5 - interface_vhost_user.robot +++ b/tests/suites/honeycomb/050_interface_vhost_user.robot @@ -12,7 +12,6 @@ # limitations under the License. *** Variables *** -| ${node}= | ${nodes['DUT1']} | ${interface}= | ${node['interfaces']['port1']['name']} | ${vhost_interface}= | test_vhost | &{vhost_user_server}= | socket=soc1 | role=server diff --git a/tests/suites/honeycomb/6 - sub_interface.robot b/tests/suites/honeycomb/060_sub_interface.robot similarity index 99% rename from tests/suites/honeycomb/6 - sub_interface.robot rename to tests/suites/honeycomb/060_sub_interface.robot index 0ad6deb0d6..8f43a52e2e 100644 --- a/tests/suites/honeycomb/6 - sub_interface.robot +++ b/tests/suites/honeycomb/060_sub_interface.robot @@ -25,8 +25,6 @@ | ... | delete a sub-interface. *** Variables *** -| ${node}= | ${nodes['DUT1']} - # Test interface 1 and its sub-interface parameters: | ${super_if}= | ${node['interfaces']['port1']['name']} | ${sub_if_id}= | ${sub_if_1_settings['identifier']} @@ -36,7 +34,8 @@ | Honycomb creates sub-interface | | [Documentation] | Check if Honeycomb creates a sub-interface. | | ... -| | Given sub-interface configuration from Honeycomb should be empty +| | Given interface state is | ${node} | ${super_if} | down +| | And sub-interface configuration from Honeycomb should be empty | | ... | ${node} | ${super_if} | ${sub_if_id} | | And interface configuration from VAT should be empty | | ... | ${node} | ${sub_if_name} diff --git a/tests/suites/honeycomb/9 - notification.robot b/tests/suites/honeycomb/070_notification.robot similarity index 97% rename from tests/suites/honeycomb/9 - notification.robot rename to tests/suites/honeycomb/070_notification.robot index 5769ea0e73..117f024b21 100644 --- a/tests/suites/honeycomb/9 - notification.robot +++ b/tests/suites/honeycomb/070_notification.robot @@ -12,8 +12,7 @@ # limitations under the License. *** Variables *** -# Node and interfaces to run tests on. -| ${node}= | ${nodes['DUT1']} +# Interfaces to run tests on. | ${interface}= | ${node['interfaces']['port1']['name']} | ${tap_interface}= | tap_test | &{tap_settings}= | tap-name=tap_test | mac=08:00:27:c0:5d:37 diff --git a/tests/suites/honeycomb/7 - persistence.robot b/tests/suites/honeycomb/900_persistence.robot similarity index 96% rename from tests/suites/honeycomb/7 - persistence.robot rename to tests/suites/honeycomb/900_persistence.robot index ad0aeced8d..e3f68ccc33 100644 --- a/tests/suites/honeycomb/7 - persistence.robot +++ b/tests/suites/honeycomb/900_persistence.robot @@ -12,8 +12,7 @@ # limitations under the License. *** Variables*** -# Node and interface to run tests on. -| ${node}= | ${nodes['DUT1']} +# Interface to run tests on. | ${interface}= | ${node['interfaces']['port1']['name']} *** Settings *** diff --git a/tests/suites/honeycomb/__init__.robot b/tests/suites/honeycomb/__init__.robot index 264f604599..d38852a090 100644 --- a/tests/suites/honeycomb/__init__.robot +++ b/tests/suites/honeycomb/__init__.robot @@ -12,6 +12,7 @@ # limitations under the License. *** Variables*** +# Honeycomb node to run tests on. | ${node}= | ${nodes['DUT1']} *** Settings *** @@ -20,5 +21,6 @@ | Resource | resources/libraries/robot/honeycomb/honeycomb.robot | Suite Setup | Run keywords | Setup all DUTs before test | AND | ... | Clear persisted Honeycomb configuration | ${node} | AND -| ... | Setup Honeycomb service on DUTs | ${node} +| ... | Setup Honeycomb service on DUTs | ${node} | AND +| ... | Set Global Variable | ${node} | Suite Teardown | Stop Honeycomb service on DUTs | ${node} -- 2.16.6