Make ssh cleanup only if the ssh_keyfile was created
Signed-off-by: DANIEL STOICA <daniel.stoica@enea.com>
Change-Id: I685c12bbd0a374a7a6381dfbe5eb53c36c076062
Library OperatingSystem
Library BuiltIn
Suite Setup Open Connection And Log In
-Suite Teardown Run Keywords
-... Cleanup ssh
-... Close All Connections
+Suite Teardown Close All Connections
*** Test Cases ***
Run Vuls test
Run Keyword If '${status}' == 'False' FAIL Vulnerabilities discovered
... non-critical
+ Run Keyword IF '${SSH_KEYFILE}' == 'None' Cleanup ssh
+
*** Keywords ***
Run vuls for ubuntu
${os_version} = SSHLibrary.Execute Command source /etc/os-release && echo $VERSION_ID | cut -d '.' -f1