From: DANIEL STOICA Date: Tue, 12 May 2020 14:00:05 +0000 (+0300) Subject: Fix ssh cleanup issue for vuls test X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=698d473074537ae738bbac8a887b7e7547113724;p=validation.git Fix ssh cleanup issue for vuls test Make ssh cleanup only if the ssh_keyfile was created Signed-off-by: DANIEL STOICA Change-Id: I685c12bbd0a374a7a6381dfbe5eb53c36c076062 --- diff --git a/tests/os/vuls/vuls.robot b/tests/os/vuls/vuls.robot index 6095ffb..0847322 100644 --- a/tests/os/vuls/vuls.robot +++ b/tests/os/vuls/vuls.robot @@ -20,9 +20,7 @@ Library SSHLibrary 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 @@ -54,6 +52,8 @@ 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