Bmp initiation timeout
[integration/test.git] / csit / suites / bgpcep / bgpfunct / 050_bmp_basic.robot
index fb05935a89be2b637091cbb743368cc59407f35e..c9bbe997398927ca2890903dcc39ac17e4b1ccbb 100644 (file)
@@ -22,22 +22,29 @@ Library           SSHLibrary
 Library           RequestsLibrary
 Resource          ${CURDIR}/../../../libraries/CompareStream.robot
 Resource          ${CURDIR}/../../../libraries/NexusKeywords.robot
-Resource          ${CURDIR}/../../../libraries/Utils.robot
+Resource          ${CURDIR}/../../../libraries/RemoteBash.robot
 Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${CONFIG_SESSION}    config-session
-${BGP_BMP_DIR}    ${CURDIR}/../../../variables/bgpfunctional/bmp_basic
+${BGP_BMP_DIR}    ${CURDIR}/../../../variables/bgpfunctional/bmp_basic/filled_structure
+${BGP_BMP_FEAT_DIR}    ${CURDIR}/../../../variables/bgpfunctional/bmp_basic/empty_structure
 ${BMP_LOG_FILE}    bmpmock.log
 
 *** Test Cases ***
+Verify BMP Feature
+    [Documentation]    Verifies if feature is up
+    &{mapping}    BuiltIn.Create_Dictionary    TOOL_IP=${TOOLS_SYSTEM_IP}
+    BuiltIn.Wait_Until_Keyword_Succeeds    180s    5s    TemplatedRequests.Get_As_Json_Templated    folder=${BGP_BMP_FEAT_DIR}    mapping=${mapping}    session=${CONFIG_SESSION}
+    ...    verify=True
+
 Start_Bmp_Mock
     [Documentation]    Starts bmp-mock on tools vm
     ${command}=    NexusKeywords.Compose_Full_Java_Command    -jar ${filename} --local_address ${TOOLS_SYSTEM_IP} --remote_address ${ODL_SYSTEM_IP}:12345 --routers_count 1 --peers_count 1 --log_level DEBUG 2>&1 | tee ${BMP_LOG_FILE}
     BuiltIn.Log    ${command}
     SSHLibrary.Set_Client_Configuration    timeout=30s
     SSHLibrary.Write    ${command}
-    ${until_phrase}=    CompareStream.Set_Variable_If_At_Least_Boron    successfully established.    sucesfully established.
+    ${until_phrase}=    Set Variable    successfully established.
     SSHLibrary.Read_Until    ${until_phrase}
 
 Verify Data Reported
@@ -48,7 +55,7 @@ Verify Data Reported
 
 Stop_Bmp_Mock
     [Documentation]    Send ctrl+c to bmp-mock to stop it
-    Utils.Write_Bare_Ctrl_C
+    RemoteBash.Write_Bare_Ctrl_C
     ${output}=    SSHLibrary.Read_Until_Prompt
     BuiltIn.Log    ${output}
 
@@ -62,7 +69,7 @@ Set_It_Up
     BuiltIn.Set_Suite_Variable    ${filename}    ${name}
 
 Tear_It_Down
-    [Documentation]    Download pccmock.log and Log its contents.
+    [Documentation]    Download bmpmock.log and Log its contents.
     ...    Compute and Log the diff between expected and actual normalized responses.
     ...    Close both HTTP client session and SSH connection to Mininet.
     SSHLibrary.Get_File    ${BMP_LOG_FILE}