FIXES: Correct issues revealed in BD Lab deployment
[it/test.git] / ric_robot_suite / robot / testsuites / mcxapp.robot
index dd85e45..6c04a4b 100644 (file)
@@ -48,25 +48,26 @@ MC XApp Listener Should Not Be Producing Errors
 Writer Should Be Successfully Sending Statistics
   [Tags]  etetests  xapptests  mcxapptests
   Set Test Variable  ${finalStatus}  PASS
-  :FOR  ${stat}  IN  @{GLOBAL_MCXAPP_WRITER_STATISTICS}
-  \  ${statRE} =        Regexp Escape  ${stat}
-  \  ${log} =           Most Recent Container Log
-  ...                   ${GLOBAL_MCXAPP_WRITER_NAME}
-  ...                   ^${statRE}:\\s+successful\\s+ves\\s+posts\\.*
-  \  ${status}  ${u} =  Run Keyword And Ignore Error
-  ...                   Should Contain Match  ${log}  regexp=${writerVesSuccesses}
-  \  ${finalStatus} =   Set Variable If  "${status}" == "FAIL"
-  ...                   FAIL
-  ...                   ${finalStatus}
-  \  Run Keyword If     "${status}" == "FAIL"
-  ...                   Log  No messages have been sent to VES for ${stat}
-  \  ${status}  ${u} =  Run Keyword And Ignore Error
-  ...                   Should Not Contain Match  ${log}  regexp=${writerVesErrors}
-  \  ${finalStatus} =   Set Variable If  "${status}" == "FAIL"
-  ...                   FAIL
-  ...                   ${finalStatus}
-  \  Run Keyword If     "${status}" == "FAIL"
-  ...                   Log  ${stat} is producing errors logging to VES
+  FOR  ${stat}  IN  @{GLOBAL_MCXAPP_WRITER_STATISTICS}
+     ${statRE} =        Regexp Escape  ${stat}
+     ${log} =           Most Recent Container Log
+     ...                ${GLOBAL_MCXAPP_WRITER_NAME}
+     ...                ^${statRE}:\\s+successful\\s+ves\\s+posts\\.*
+     ${status}  ${u} =  Run Keyword And Ignore Error
+     ...                Should Contain Match  ${log}  regexp=${writerVesSuccesses}
+     ${finalStatus} =   Set Variable If  "${status}" == "FAIL"
+     ...                FAIL
+     ...                ${finalStatus}
+     Run Keyword If     "${status}" == "FAIL"
+     ...                Log  No messages have been sent to VES for ${stat}
+     ${status}  ${u} =  Run Keyword And Ignore Error
+     ...                Should Not Contain Match  ${log}  regexp=${writerVesErrors}
+     ${finalStatus} =   Set Variable If  "${status}" == "FAIL"
+     ...                FAIL
+     ...                ${finalStatus}
+     Run Keyword If     "${status}" == "FAIL"
+     ...                Log  ${stat} is producing errors logging to VES
+  END   
   Run Keyword If        "${finalStatus}" == "FAIL"
   ...                   Fail  One or more statistics is not being succesfully logged
 
@@ -76,8 +77,9 @@ Most Recent Availability Condition
   # temporally.
   [Arguments]  @{Conditions}
   ${status} =  Set Variable  'False'
-  :FOR  ${Condition}  IN  @{Conditions}
-  \  ${status} =  Set Variable If  '${Condition.type}' == 'Available'  ${Condition.status}  ${status}
+  FOR  ${Condition}  IN  @{Conditions}
+     ${status} =  Set Variable If  '${Condition.type}' == 'Available'  ${Condition.status}  ${status}
+  END   
   [Return]  ${status}
 
 Most Recent Match
@@ -91,13 +93,14 @@ Most Recent Container Log
   [Arguments]   ${container}=${EMPTY}  ${regex}=${EMPTY}
   ${pods} =            Retrieve Pods For Deployment  ${deploymentName}
   ${logs} =            Create List
-  :FOR  ${pod}  IN  @{pods}
-  \  ${log} =   Retrieve Log For Pod     ${pod}             ${container}
-  \  Should Not Be Empty        ${log}   No log entries for ${pod}/${container}
-  \  ${line} =  Run Keyword If           "${regex}" != "${EMPTY}"
-  ...                                    Most Recent Match  ${log}  ${regex}
-  ...           ELSE
-  ...                                    Get From List      ${log}  -1
-  \  Append To List             ${logs}  ${line}
+  FOR  ${pod}  IN  @{pods}
+     ${log} =   Retrieve Log For Pod     ${pod}             ${container}
+     Should Not Be Empty        ${log}   No log entries for ${pod}/${container}
+     ${line} =  Run Keyword If           "${regex}" != "${EMPTY}"
+     ...                                 Most Recent Match  ${log}  ${regex}
+     ...        ELSE
+     ...                                 Get From List      ${log}  -1
+     Append To List             ${logs}  ${line}
+  END   
   [Return]                      ${logs}