Fix bgpcep-1node-bgp-ingest tests
[integration/test.git] / csit / libraries / KarafKeywords.robot
index 756fba6fd9420189eb05c20b110fc32ab0671814..6e935f5eb96b44d67b64c89c24d2bbc9b997705a 100644 (file)
@@ -45,7 +45,7 @@ Issue_Command_On_Karaf_Console
     SSHLibrary.Login    ${KARAF_USER}    ${KARAF_PASSWORD}    loglevel=${loglevel}
     SSHLibrary.Write    ${cmd}
     ${output}    SSHLibrary.Read_Until_Regexp    ${KARAF_PROMPT}
-    SSHLibrary.Write    logout
+    SSHLibrary.Write_Bare    logout\n
     SSHLibrary.Close_Connection
     BuiltIn.Log    ${output}
     [Return]    ${output}
@@ -165,7 +165,7 @@ Open_Controller_Karaf_Console_On_Background
     ${karaf_connection_object} =    SSHLibrary.Get_Connection
     Collections.Set_To_Dictionary    ${connection_index_dict}    ${member_index}    ${karaf_connection_object.index}
     SSHLibrary.Login    ${KARAF_USER}    ${KARAF_PASSWORD}    loglevel=${loglevel}
-    [Teardown]    Run Keyword If    '${IS_KARAF_APPL}' == 'TRUE'    SSHKeywords.Restore_Current_Ssh_Connection_From_Index    ${current_ssh_connection_object.index}
+    [Teardown]    Run Keyword If    '${IS_KARAF_APPL}' == 'True'    SSHKeywords.Restore_Current_Ssh_Connection_From_Index    ${current_ssh_connection_object.index}
 
 Open_Controller_Karaf_Console_With_Timeout
     [Arguments]    ${member_index}=${1}    ${timeout}=3s
@@ -222,7 +222,7 @@ Log_Message_To_Controller_Karaf
     ${index_list} =    ClusterManagement.List_Indices_Or_All    given_list=${member_index_list}
     FOR    ${index}    IN    @{index_list}    # usually: 1, 2, 3.
         ${status}    ${output} =    BuiltIn.Run_Keyword_And_Ignore_Error    Execute_Controller_Karaf_Command_With_Retry_On_Background    log:log "ROBOT MESSAGE: ${message}"    member_index=${index}
-        BuiltIn.Run_Keyword_Unless    ${tolerate_failure} or "${status}" == "PASS"    BuiltIn.Fail    ${output}
+        BuiltIn.Run_Keyword_If    not ${tolerate_failure} and "${status}" != "PASS"    BuiltIn.Fail    ${output}
     END
 
 Log_Test_Suite_Start_To_Controller_Karaf