X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fssh_lib.robot;h=216cd59347d55feba20b1becc243a8a78364fb4a;hb=6cd74807debed3f4414da8b4d3fc4c17b1b56c14;hp=23e5ae491072f00e19703834f0aadb46491c4481;hpb=f96bb45c0a03f2188688d90d67ea718851cec2de;p=osm%2Ftests.git diff --git a/robot-systest/lib/ssh_lib.robot b/robot-systest/lib/ssh_lib.robot index 23e5ae4..216cd59 100644 --- a/robot-systest/lib/ssh_lib.robot +++ b/robot-systest/lib/ssh_lib.robot @@ -30,6 +30,16 @@ Check If remote File Exists Close All Connections Should Be Equal As Integers ${rc} 0 +Check If Remote Folder Exists + [Arguments] ${host} ${username} ${password} ${privatekey} ${folder} + + Open Connection ${host} + Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password} + ... ELSE Login With Public Key ${username} ${privatekey} + ${output}= Execute Command ls -d ${folder} + Close All Connections + Should Be Equal As Strings ${output} ${folder} + Get Remote File Content [Arguments] ${host} ${username} ${password} ${privatekey} ${file}