Fix outputs in bgp-ha 97/78097/2
authorTomas Markovic <tomas.markovic@pantheon.tech>
Fri, 23 Nov 2018 14:25:11 +0000 (15:25 +0100)
committerJamo Luhrsen <jluhrsen@redhat.com>
Mon, 26 Nov 2018 18:27:06 +0000 (18:27 +0000)
Change-Id: Iec24e3a285cf7af6008e7d2bb8949f16527a24ed
Signed-off-by: Tomas Markovic <tomas.markovic@pantheon.tech>
csit/libraries/BgpOperations.robot
csit/suites/bgpcep/bgpclustering/060_pcep_ha_karaf_restart.robot
csit/suites/bgpcep/bgpclustering/060_pcep_ha_karaf_stop.robot
csit/variables/bgpclustering/pcep_on_state/data.json

index 85443631fc0cc58b765725ee63bce35a02a5b82f..98809ed4b2d0fe06b0673cb3efb52eda8951523e 100644 (file)
@@ -19,6 +19,8 @@ ${RIB_NAME}       example-bgp-rib
 ${OLD_AS_PATH}    \n"as-path": {},
 ${NEW_AS_PATH}    ${EMPTY}
 &{APP_PEER}       IP=${ODL_SYSTEM_IP}    BGP_RIB=${RIB_NAME}
+${NEW_IPV4_ROUTES_LINE}    ${EMPTY}
+${OLD_IPV4_ROUTES_LINE}    \n"bgp-inet:ipv4-routes": {},
 
 *** Keywords ***
 Start Quagga Processes On ODL
@@ -301,7 +303,8 @@ Bmp_Monitor_Precondition
 Bmp_Monitor_Postcondition
     [Arguments]    ${session}
     [Documentation]    Verifies if example-bmp-monitor data contains one peer.
-    &{mapping}    BuiltIn.Create_Dictionary    TOOL_IP=${TOOLS_SYSTEM_IP}
+    ${routes_line} =    CompareStream.Set_Variable_If_At_Least_Neon    ${NEW_IPV4_ROUTES_LINE}    ${OLD_IPV4_ROUTES_LINE}
+    &{mapping}    BuiltIn.Create_Dictionary    TOOL_IP=${TOOLS_SYSTEM_IP}    ROUTES_LINE=${routes_line}
     ${output}    BuiltIn.Wait_Until_Keyword_Succeeds    10x    5s    TemplatedRequests.Get_As_Json_Templated    folder=${BGP_BMP_DIR}    mapping=${mapping}
     ...    session=${session}    verify=True
     BuiltIn.Log    ${output}
index 298bb2ff22636b188358bacb88294a682fde7707..a9b5de12f0c62215bd3df4f7067bdc6d46dcb531 100644 (file)
@@ -33,6 +33,8 @@ ${HOLDTIME}       180
 ${DIR_WITH_TEMPLATES}    ${CURDIR}/../../../variables/bgpclustering/
 ${PCC_LOG_FILE}    pccmock.restart.log
 ${CONFIG_SESSION}    session
+${OLD_ERROR_ARGS}    \n"last-received-error": {},\n"last-sent-error": {},
+${NEW_ERROR_ARGS}    ${EMPTY}
 
 *** Test Cases ***
 Get_Example_Pcep_Owner
@@ -103,6 +105,8 @@ Setup_Everything
     ${code}=    Evaluate    binascii.b2a_base64('${pcc_name}')[:-1]    modules=binascii
     BuiltIn.Set_Suite_Variable    ${pcc_name_code}    ${code}
     PcepOperations.Pcep_Topology_Precondition    ${CONFIG_SESSION}
+    ${ERROR_ARGS} =    CompareStream.Set_Variable_If_At_Least_Neon    ${NEW_ERROR_ARGS}    ${OLD_ERROR_ARGS}
+    BuiltIn.Set_Suite_Variable    ${ERROR_ARGS}
     Start_Pcc_Mock
 
 Teardown_Everything
@@ -118,7 +122,7 @@ Start_Pcc_Mock
 
 Pcep_Topology_Postcondition
     [Documentation]    Verifies if the tool reported expected data
-    &{mapping}    BuiltIn.Create_Dictionary    IP=${TOOLS_SYSTEM_IP}    CODE=${pcc_name_code}    NAME=${pcc_name}    IP_ODL=${ODL_SYSTEM_${pcep_owner}_IP}
+    &{mapping}    BuiltIn.Create_Dictionary    IP=${TOOLS_SYSTEM_IP}    CODE=${pcc_name_code}    NAME=${pcc_name}    IP_ODL=${ODL_SYSTEM_${pcep_owner}_IP}    ERRORS=${ERROR_ARGS}
     BuiltIn.Wait_Until_Keyword_Succeeds    10x    5s    TemplatedRequests.Get_As_Json_Templated    ${DIR_WITH_TEMPLATES}${/}pcep_on_state    ${mapping}    ${living_session}
     ...    verify=True
 
index 7faaa4de1d349e4f31e51eeb427d87441abf6ea7..7860042b7ee6133c9edf098307af8ed177e58b45 100644 (file)
@@ -33,6 +33,8 @@ ${HOLDTIME}       180
 ${DIR_WITH_TEMPLATES}    ${CURDIR}/../../../variables/bgpclustering/
 ${PCC_LOG_FILE}    pccmock.stop.log
 ${CONFIG_SESSION}    session
+${OLD_ERROR_ARGS}    \n"last-received-error": {},\n"last-sent-error": {},
+${NEW_ERROR_ARGS}    ${EMPTY}
 
 *** Test Cases ***
 Get_Example_Pcep_Owner
@@ -102,6 +104,8 @@ Setup_Everything
     ${code}=    Evaluate    binascii.b2a_base64('${pcc_name}')[:-1]    modules=binascii
     BuiltIn.Set_Suite_Variable    ${pcc_name_code}    ${code}
     PcepOperations.Pcep_Topology_Precondition    ${CONFIG_SESSION}
+    ${ERROR_ARGS} =    CompareStream.Set_Variable_If_At_Least_Neon    ${NEW_ERROR_ARGS}    ${OLD_ERROR_ARGS}
+    BuiltIn.Set_Suite_Variable    ${ERROR_ARGS}
     Start_Pcc_Mock
 
 Teardown_Everything
@@ -117,7 +121,7 @@ Start_Pcc_Mock
 
 Pcep_Topology_Postcondition
     [Documentation]    Verifies if the tool reported expected data
-    &{mapping}    BuiltIn.Create_Dictionary    IP=${TOOLS_SYSTEM_IP}    CODE=${pcc_name_code}    NAME=${pcc_name}    IP_ODL=${ODL_SYSTEM_${pcep_owner}_IP}
+    &{mapping}    BuiltIn.Create_Dictionary    IP=${TOOLS_SYSTEM_IP}    CODE=${pcc_name_code}    NAME=${pcc_name}    IP_ODL=${ODL_SYSTEM_${pcep_owner}_IP}    ERROR=${ERROR_ARGS}
     BuiltIn.Wait_Until_Keyword_Succeeds    10x    5s    TemplatedRequests.Get_As_Json_Templated    ${DIR_WITH_TEMPLATES}${/}pcep_on_state    ${mapping}    ${living_session}
     ...    verify=True
 
index 58a2f33bdaaff33fff337c2b229335098a6c55f9..42212b58466e89e286585924491deeee725cae57 100644 (file)
@@ -12,9 +12,7 @@
                             "session-id": "*"
                         },
                         "messages": {
-                            "error-messages": {
-                                "last-received-error": {},
-                                "last-sent-error": {},
+                            "error-messages": {$ERRORS
                                 "received-error-msg-count": 0,
                                 "sent-error-msg-count": 0
                             },