From 1813672eb9f6988046bc65167235ae37b088298c Mon Sep 17 00:00:00 2001 From: selias Date: Fri, 9 Dec 2016 18:11:53 +0100 Subject: CSIT-424: HC Test: JSON comparison function rework When comparing multi-level JSON trees, the exceptions raised carry more useful information. Keys and values not present in reference data are ignored. No longer puts chunks of honeycomb's log file into robot report. The entire log file will be archived after https://gerrit.fd.io/r/4171 Change-Id: Ib597080fa3d9b2c43463c76ee0d52f317ea072e7 Signed-off-by: selias --- resources/libraries/robot/honeycomb/access_control_lists.robot | 3 +-- resources/libraries/robot/honeycomb/interfaces.robot | 2 +- resources/libraries/robot/honeycomb/sub_interface.robot | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'resources/libraries/robot') diff --git a/resources/libraries/robot/honeycomb/access_control_lists.robot b/resources/libraries/robot/honeycomb/access_control_lists.robot index a9ea7dffe6..d24da5bd96 100644 --- a/resources/libraries/robot/honeycomb/access_control_lists.robot +++ b/resources/libraries/robot/honeycomb/access_control_lists.robot @@ -12,7 +12,6 @@ # limitations under the License. *** Variables *** #TODO: update based on resolution of bug https://jira.fd.io/browse/HONEYCOMB-119 -| @{hc_table_ignore}= | memory_size *** Settings *** | Library | resources.libraries.python.Classify @@ -124,7 +123,7 @@ | | ... | \| ${settings} \| | | [Arguments] | ${node} | ${settings} | | ${data}= | Get classify table oper data | ${node} | ${settings['name']} -| | Compare data structures | ${data} | ${settings} | ignore=${hc_table_ignore} +| | Compare data structures | ${data} | ${settings} | ACL table from VAT should be | | [Documentation] | Retrieves ACL table information from VAT\ diff --git a/resources/libraries/robot/honeycomb/interfaces.robot b/resources/libraries/robot/honeycomb/interfaces.robot index 027b7d74a3..765aaef7c0 100644 --- a/resources/libraries/robot/honeycomb/interfaces.robot +++ b/resources/libraries/robot/honeycomb/interfaces.robot @@ -235,7 +235,7 @@ | | ${api_data}= | interfaceAPI.Get interface oper data | ${node} | ${interface} | | ${data_neighbors}= | Set Variable | ${api_data['ietf-ip:ipv4']['neighbor']} | | Compare data structures -| | ... | ${data_neighbors} | ${neighbors} | list_order=${False} +| | ... | ${data_neighbors} | ${neighbors} | | Should be equal | ${neighbor['fib_address']} | | ... | ${api_data['ietf-ip:ipv4']['neighbor'][0]['ip']} | | Should be equal | ${neighbor['fib_mac']} diff --git a/resources/libraries/robot/honeycomb/sub_interface.robot b/resources/libraries/robot/honeycomb/sub_interface.robot index e9b8aeb008..4a9f5c403b 100644 --- a/resources/libraries/robot/honeycomb/sub_interface.robot +++ b/resources/libraries/robot/honeycomb/sub_interface.robot @@ -68,7 +68,6 @@ | | ${api_data}= | interfaceAPI.Get sub interface oper data | | ... | ${node} | ${super_interface} | ${identifier} | | interfaceAPI.Compare Data Structures | ${api_data} | ${sub_if_settings} -| | ... | list_order=${False} | Sub-interface configuration from Honeycomb should be empty | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \ @@ -391,7 +390,7 @@ | | ${api_data}= | interfaceAPI.Get tag rewrite oper data | | ... | ${node} | ${super_if} | ${identifier} | | interfaceAPI.Compare Data Structures -| | ... | ${api_data} | ${settings} | list_order=${False} +| | ... | ${api_data} | ${settings} | Rewrite tag from VAT should be | | [Documentation] | Retrieves sub-interface configuration through VAT and\ -- cgit 1.2.3-korg