aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-06-04 11:53:38 +0200
committerPeter Mikus <pmikus@cisco.com>2019-06-04 12:07:28 +0000
commita6f5c70ef06f68e6a0d77bad3c3952b5eb970d8f (patch)
treef4af05ec2f580d4ab9c92ec23e5652dab110515e
parent13c4592520859a8787c71ceef7d01b9c8f4dcba1 (diff)
fix Honeycomb failing tests
- due to VAT to PAPI migration some tests need to be updated - fixed HC tests: ACL, Interfaces/SubInterfaces, Tap Vhost, Vxlan, Vxlan-gpe Change-Id: I9adad041a619b48057bdda388becd53dde484483 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
-rw-r--r--resources/libraries/robot/honeycomb/access_control_lists.robot5
-rw-r--r--resources/libraries/robot/honeycomb/interfaces.robot20
-rw-r--r--resources/libraries/robot/honeycomb/sub_interface.robot8
-rw-r--r--resources/libraries/robot/honeycomb/tap.robot4
-rw-r--r--resources/libraries/robot/honeycomb/vhost_user.robot4
-rw-r--r--resources/libraries/robot/honeycomb/vxlan.robot4
-rw-r--r--resources/libraries/robot/honeycomb/vxlan_gpe.robot14
-rw-r--r--tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot26
8 files changed, 46 insertions, 39 deletions
diff --git a/resources/libraries/robot/honeycomb/access_control_lists.robot b/resources/libraries/robot/honeycomb/access_control_lists.robot
index 37cd03c6be..e30b48e733 100644
--- a/resources/libraries/robot/honeycomb/access_control_lists.robot
+++ b/resources/libraries/robot/honeycomb/access_control_lists.robot
@@ -325,8 +325,9 @@
| | ... | \| ${nodes['DUT1']} \| GigabithEthernet0/8/0 \|
| | [Arguments] | ${node} | ${interface}
| | ${data}= | Get interface classify table | ${node} | ${interface}
-| | Should be equal | ${data['l2_table_id']} | ${-1}
-| | Should be equal | ${data['ip4_table_id']} | ${-1}
+| | ${bitwise_non_zero}= | Convert To Integer | ${0xFFFFFFFF}
+| | Should be equal | ${data['l2_table_id']} | ${bitwise_non_zero}
+| | Should be equal | ${data['ip4_table_id']} | ${bitwise_non_zero}
| Clear all ACL settings
| | [Documentation] | Removes all ACL sessions and tables from Honeycomb\
diff --git a/resources/libraries/robot/honeycomb/interfaces.robot b/resources/libraries/robot/honeycomb/interfaces.robot
index 461a49557e..7159124242 100644
--- a/resources/libraries/robot/honeycomb/interfaces.robot
+++ b/resources/libraries/robot/honeycomb/interfaces.robot
@@ -177,16 +177,19 @@
| | ... | - address - IP address to expect. Type: string
| | ... | - prefix - prefix length to expect. Type: string
| | ... | - netmask - subnet mask to expect. Type: string
+| | ... | - sw_if_index - Index of interface. Type: integer
| | ...
| | ... | *Example:*
| | ...
| | ... | \| IPv4 address from VAT should be \| ${nodes['DUT1']} \
| | ... | \| GigabitEthernet0/8/0 \| 192.168.0.2 \| ${24} \| 255.255.255.0 \|
| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} | ${netmask}
+| | ${sw_if_index}= | Vpp Get Interface Sw Index | ${node} | ${interface}
| | ${vpp_data}= | VPP get interface ip addresses
| | ... | ${node} | ${interface} | ipv4
| | ${settings}= | Create Dictionary
-| | ... | ip=${address} | netmask=${netmask} | prefix_length=${prefix}
+| | ... | ip=${address} | netmask=${netmask} | sw_if_index=${sw_if_index}
+| | ... | prefix_length=${prefix} | is_ipv6=${0}
| | Should contain | ${vpp_data} | ${settings}
| Honeycomb removes interface IPv4 addresses
@@ -234,9 +237,8 @@
| | ... | \| IPv4 config from VAT should be empty \| ${nodes['DUT1']} \
| | ... | \| GigabitEthernet0/8/0 \|
| | [Arguments] | ${node} | ${interface}
-| | Run keyword and expect error | *No JSON object could be decoded*
-| | ... | VPP get interface ip addresses
-| | ... | ${node} | ${interface} | ipv4
+| | ${data}= | VPP get interface ip addresses | ${node} | ${interface} | ipv4
+| | Should be empty | ${data}
| Honeycomb adds interface IPv4 neighbor
| | [Documentation] | Uses Honeycomb API to assign an ipv4 neighbor to the\
@@ -393,16 +395,19 @@
| | ... | - interface - name of an interface on the specified node. Type: string
| | ... | - address - IP address to expect. Type: string
| | ... | - prefix - length of subnet prefix to expect. Type: string
+| | ... | - sw_if_index - index of interface. Type: integer
| | ...
| | ... | *Example:*
| | ...
| | ... | \| IPv6 address from VAT should contain \| ${nodes['DUT1']} \
| | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 64 \|
| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix}
+| | ${sw_if_index}= | Vpp Get Interface Sw Index | ${node} | ${interface}
| | ${vpp_data}= | VPP get interface ip addresses
| | ... | ${node} | ${interface} | ipv6
| | ${settings}= | Create Dictionary
-| | ... | ip=${address} | prefix_length=${prefix}
+| | ... | ip=${address} | sw_if_index=${sw_if_index} | prefix_length=${prefix}
+| | ... | is_ipv6=${1}
| | Should contain | ${vpp_data} | ${settings}
| Honeycomb removes interface IPv6 addresses
@@ -450,9 +455,8 @@
| | ... | \| IPv6 config from VAT should be empty \| ${nodes['DUT1']} \
| | ... | \| GigabitEthernet0/8/0 \|
| | [Arguments] | ${node} | ${interface}
-| | Run keyword and expect error | *No JSON object could be decoded*
-| | ... | VPP get interface ip addresses
-| | ... | ${node} | ${interface} | ipv6
+| | ${data}= | VPP get interface ip addresses | ${node} | ${interface} | ipv6
+| | Should be empty | ${data}
| Honeycomb adds interface IPv6 neighbor
| | [Documentation] | Uses Honeycomb API to assign an ipv6 neighbor to the\
diff --git a/resources/libraries/robot/honeycomb/sub_interface.robot b/resources/libraries/robot/honeycomb/sub_interface.robot
index a7f739b1b0..6e60b23c37 100644
--- a/resources/libraries/robot/honeycomb/sub_interface.robot
+++ b/resources/libraries/robot/honeycomb/sub_interface.robot
@@ -546,9 +546,9 @@
| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
| | ...
| | [Arguments] | ${node} | ${sub_interface}
-| | Run keyword and expect error | *No JSON object could be decoded*
-| | ... | VPP get interface ip addresses
+| | ${data}= | VPP get interface ip addresses
| | ... | ${node} | ${sub_interface} | ipv4
+| | Should be empty | ${data}
| Honeycomb sets sub-interface ipv6 address
| | [Documentation] | Uses Honeycomb API to configure an ipv6 address on the\
@@ -664,6 +664,6 @@
| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
| | ...
| | [Arguments] | ${node} | ${sub_interface}
-| | Run keyword and expect error | *No JSON object could be decoded*
-| | ... | VPP get interface ip addresses
+| | ${data}= | VPP get interface ip addresses
| | ... | ${node} | ${sub_interface} | ipv6
+| | Should be empty | ${data}
diff --git a/resources/libraries/robot/honeycomb/tap.robot b/resources/libraries/robot/honeycomb/tap.robot
index 8a80c4d555..37d6a02f52 100644
--- a/resources/libraries/robot/honeycomb/tap.robot
+++ b/resources/libraries/robot/honeycomb/tap.robot
@@ -140,5 +140,5 @@
| | ... | \| ${nodes['DUT1']} \| tap_int1 \|
| | ...
| | [Arguments] | ${node} | ${interface}
-| | Run Keyword And Expect Error | ValueError: No JSON object could be decoded
-| | ... | TAP Dump | ${node} | ${interface}
+| | ${data}= | TAP Dump | ${node} | ${interface}
+| | Should be empty | ${data}
diff --git a/resources/libraries/robot/honeycomb/vhost_user.robot b/resources/libraries/robot/honeycomb/vhost_user.robot
index 0c662993b4..d60917703f 100644
--- a/resources/libraries/robot/honeycomb/vhost_user.robot
+++ b/resources/libraries/robot/honeycomb/vhost_user.robot
@@ -140,8 +140,8 @@
| | ... | \| ${nodes['DUT1']} \|
| | ...
| | [Arguments] | ${node}
-| | Run Keyword And Expect Error | ValueError: No JSON object could be decoded
-| | ... | vhost user Dump | ${node}
+| | ${data}= | vhost user Dump | ${node}
+| | Should be empty | ${data}
| Honeycomb fails setting vhost-user on different interface type
| | [Documentation] | Attempts to set vhost-user settings on an ethernet\
diff --git a/resources/libraries/robot/honeycomb/vxlan.robot b/resources/libraries/robot/honeycomb/vxlan.robot
index ed21d192c8..951a0d109c 100644
--- a/resources/libraries/robot/honeycomb/vxlan.robot
+++ b/resources/libraries/robot/honeycomb/vxlan.robot
@@ -127,8 +127,8 @@
| | ... | \| ${nodes['DUT1']} \|
| | ...
| | [Arguments] | ${node}
-| | Run Keyword And Expect Error | ValueError: No JSON object could be decoded
-| | ... | VxLAN Dump | ${node}
+| | ${data}= | VxLAN Dump | ${node}
+| | Should be empty | ${data}
| Honeycomb fails setting VxLan on different interface type
| | [Documentation] | Attempts to set VxLAN settings on an ethernet\
diff --git a/resources/libraries/robot/honeycomb/vxlan_gpe.robot b/resources/libraries/robot/honeycomb/vxlan_gpe.robot
index 2f2cfc50b4..20ca7f5f1a 100644
--- a/resources/libraries/robot/honeycomb/vxlan_gpe.robot
+++ b/resources/libraries/robot/honeycomb/vxlan_gpe.robot
@@ -114,7 +114,8 @@
| | ...
| | [Arguments] | ${node} | ${interface} | ${vxlan_gpe_params}
| | ...
-| | ${vat_data}= | VxLAN GPE Dump | ${node} | ${interface}
+| | ${if1}= | Vpp Get Interface Sw Index | ${node} | ${interface}
+| | ${vat_data}= | VxLAN GPE Dump | ${node} | ${if1}
| | Should be equal as strings
| | ... | ${vat_data['local']} | ${vxlan_gpe_params['local']}
| | Should be equal as strings
@@ -125,8 +126,7 @@
| | ... | ${vat_data['encap_vrf_id']} | ${vxlan_gpe_params['encap-vrf-id']}
| | Should be equal as strings
| | ... | ${vat_data['decap_vrf_id']} | ${vxlan_gpe_params['decap-vrf-id']}
-# VAT dump multiplies protocol value by 16777216
-| | Should be equal as strings | ${vat_data['protocol']/16777216}
+| | Should be equal as strings | ${vat_data['protocol']}
| | ... | ${protocols['${vxlan_gpe_params['next-protocol']}']}
| VxLAN GPE Interface indices from Honeycomb and VAT should correspond
@@ -147,7 +147,8 @@
| | [Arguments] | ${node} | ${interface}
| | ...
| | ${api_data}= | Get interface oper data | ${node} | ${interface}
-| | ${vat_data}= | VxLAN GPE Dump | ${node} | ${interface}
+| | ${if1}= | Vpp Get Interface Sw Index | ${node} | ${interface}
+| | ${vat_data}= | VxLAN GPE Dump | ${node} | ${if1}
| | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1
| | Should be equal as strings
| | ... | ${api_data['if-index']} | ${sw_if_index}
@@ -180,9 +181,8 @@
| | ... | \| ${nodes['DUT1']} \|
| | ...
| | [Arguments] | ${node}
-| | ...
-| | Run Keyword And Expect Error | ValueError: No JSON object could be decoded
-| | ... | VxLAN Dump | ${node}
+| | ${data}= | VxLAN Dump | ${node}
+| | Should be empty | ${data}
| Honeycomb fails to create VxLAN GPE interface
| | [Documentation] | Uses Honeycomb API to configure a VxLAN tunnel with wrong\
diff --git a/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot
index 50fd656346..28137fd6f4 100644
--- a/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot
+++ b/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot
@@ -14,7 +14,8 @@
*** Variables ***
# Interface to run tests on.
| ${interface}= | ${node['interfaces']['port1']['name']}
-| ${interface2}= | ${node['interfaces']['port3']['name']}
+| ${interface2}= | ${node['interfaces']['port2']['name']}
+| ${interface3}= | ${node['interfaces']['port3']['name']}
*** Settings ***
| Resource | resources/libraries/robot/shared/default.robot
@@ -145,8 +146,9 @@
| | ... | ${node} | ${interface} | ${ethernet}
| | Then Interface ethernet Operational Data From Honeycomb Should Be
| | ... | ${node} | ${interface} | ${ethernet}
+| | ${mtu}= | Create List | ${ethernet['mtu']} | ${0} | ${0} | ${0}
| | And Interface ethernet Operational Data From VAT Should Be
-| | ... | ${node} | ${interface} | ${ethernet['mtu']}
+| | ... | ${node} | ${interface} | ${mtu}
| TC09: Honeycomb modifies interface configuration - vrf
| | [Documentation] | Check if Honeycomb API can configure interface\
@@ -186,12 +188,12 @@
| | Then IPv4 address from Honeycomb should be
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address} | ${ipv4_prefix}
| | And IPv4 address from VAT should be
-| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address}
+| | ... | ${dut_node} | ${interface2} | ${ipv4_address}
| | ... | ${ipv4_prefix} | ${ipv4_mask}
| | And IPv6 address from Honeycomb should contain
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix}
| | And IPv6 address from VAT should contain
-| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix}
+| | ... | ${dut_node} | ${interface2} | ${ipv6_address} | ${ipv6_prefix}
| | And Honeycomb configures interface state
| | ... | ${dut_node} | ${dut_to_tg_if1} | up
| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
@@ -256,14 +258,14 @@
| | [Tags] | EXPECTED_FAILING
| | ...
| | Given Honeycomb sets interface IPv4 address | ${node}
-| | ... | ${interface2} | ${ipv4_address} | ${ipv4_prefix}
+| | ... | ${interface3} | ${ipv4_address} | ${ipv4_prefix}
| | When Honeycomb adds unnumbered configuration to interface
-| | ... | ${node} | ${interface} | ${interface2}
+| | ... | ${node} | ${interface} | ${interface3}
| | Then Wait until Keyword succeeds | 10s | 2s
| | ... | IPv4 address from Honeycomb should be
-| | ... | ${node} | ${interface2} | ${ipv4_address} | ${ipv4_prefix}
+| | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix}
| | And IPv4 address from VAT should be
-| | ... | ${node} | ${interface2} | ${ipv4_address}
+| | ... | ${node} | ${interface3} | ${ipv4_address}
| | ... | ${ipv4_prefix} | ${ipv4_mask}
| | And IPv4 address from Honeycomb should be
| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
@@ -279,9 +281,9 @@
| | [Tags] | EXPECTED_FAILING
| | ...
| | Given IPv4 address from Honeycomb should be
-| | ... | ${node} | ${interface2} | ${ipv4_address} | ${ipv4_prefix}
+| | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix}
| | And IPv4 address from VAT should be
-| | ... | ${node} | ${interface2} | ${ipv4_address}
+| | ... | ${node} | ${interface3} | ${ipv4_address}
| | ... | ${ipv4_prefix} | ${ipv4_mask}
| | And IPv4 address from Honeycomb should be
| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
@@ -292,9 +294,9 @@
| | ... | ${node} | ${interface}
| | Then Wait until Keyword succeeds | 10s | 2s
| | ... | IPv4 address from Honeycomb should be
-| | ... | ${node} | ${interface2} | ${ipv4_address} | ${ipv4_prefix}
+| | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix}
| | And IPv4 address from VAT should be
-| | ... | ${node} | ${interface2} | ${ipv4_address}
+| | ... | ${node} | ${interface3} | ${ipv4_address}
| | ... | ${ipv4_prefix} | ${ipv4_mask}
| | And IPv4 address from Honeycomb should be empty | ${node} | ${interface}
| | And ipv4 address from VAT should be empty | ${node} | ${interface}