Bump pre-commit-hooks to v4.1.0
[integration/test.git] / csit / libraries / SSHKeywords.robot
index e5a50d9db5223244291652bc30b9e0f25a1ec78f..adfefcc5211f1c0cd2d6ffcc2abca39581f6b1cf 100644 (file)
@@ -143,7 +143,7 @@ Assure_Library_Ipaddr
     [Documentation]    Tests whether ipaddr module is present on ssh-connected machine, Puts ipaddr.py to target_dir if not.
     ${passed} =    Execute_Command_Passes    bash -c 'cd "${target_dir}" && python -c "import ipaddr"'
     BuiltIn.Return_From_Keyword_If    ${passed}
-    SSHLibrary.Put_File    ${CURDIR}/ipaddr.py    ${target_dir}/
+    SSHLibrary.Put_File    ${CURDIR}/BGPCEP/ipaddr.py    ${target_dir}/
 
 Assure_Library_Counter
     [Arguments]    ${target_dir}=.
@@ -168,7 +168,13 @@ Virtual_Env_Create
     [Arguments]    ${upgrade_pip}=True
     [Documentation]    Creates virtual env. If not to use the default name, use Virtual_Env_Set_Path kw. Returns stdout.
     Execute_Command_At_Cwd_Should_Pass    virtualenv ${SSHKeywords__current_venv_path}
-    BuiltIn.Run_Keyword_And_Return_If    ${upgrade_pip}    Virtual_Env_Run_Cmd_At_Cwd    pip install --upgrade pip
+    BuiltIn.Run_Keyword_And_Return_If    ${upgrade_pip}    Virtual_Env_Run_Cmd_At_Cwd    pip install --upgrade pip    stderr_must_be_empty=False
+
+Virtual_Env_Create_Python3
+    [Arguments]    ${upgrade_pip}=True
+    [Documentation]    Creates virtual env. If not to use the default name, use Virtual_Env_Set_Path kw. Returns stdout.
+    Execute_Command_At_Cwd_Should_Pass    python3 -m venv ${SSHKeywords__current_venv_path}
+    BuiltIn.Run_Keyword_And_Return_If    ${upgrade_pip}    Virtual_Env_Run_Cmd_At_Cwd    pip install --upgrade pip    stderr_must_be_empty=False
 
 Virtual_Env_Delete
     [Documentation]    Deletes a directory with virtual env.
@@ -187,11 +193,11 @@ Virtual_Env_Install_Package
 Virtual_Env_Uninstall_Package
     [Arguments]    ${package}
     [Documentation]    Uninstalls python package from virtual env and returns stdout.
-    BuiltIn.Run_Keyword_And_Return    Virtual_Env_Run_Cmd_At_Cwd    pip uninstall -y ${package}
+    BuiltIn.Run_Keyword_And_Return    Virtual_Env_Run_Cmd_At_Cwd    pip uninstall -y ${package}    stderr_must_be_empty=False
 
 Virtual_Env_Freeze
     [Documentation]    Shows installed packages within the returned stdout.
-    BuiltIn.Run_Keyword_And_Return    Virtual_Env_Run_Cmd_At_Cwd    pip freeze --all
+    BuiltIn.Run_Keyword_And_Return    Virtual_Env_Run_Cmd_At_Cwd    pip freeze --all    stderr_must_be_empty=False
 
 Virtual_Env_Activate_On_Current_Session
     [Arguments]    ${log_output}=${False}