Add a line to change loglevel
[validation.git] / tests / os / vuls / vuls.robot
index 6095ffb..01ae1c4 100644 (file)
@@ -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
@@ -82,6 +82,8 @@ Cleanup ssh
     ${rc} =  Run And Return Rc  ssh '${USERNAME}'@'${HOST}' "sed -i 's#${idssh}##' ~/.ssh/authorized_keys"
     Should Be Equal As Integers  ${rc}  0
 
+# Loglevel can be TRACE, DEBUG, INFO, WARN and NONE (no logging). Default is INFO
 Open Connection And Log In
+    Set Default Configuration loglevel=INFO
     Open Connection  ${HOST}
     Run Keyword IF  '${SSH_KEYFILE}' != 'None'  Login With Public Key  ${USERNAME}  ${SSH_KEYFILE}  ELSE IF  '${PASSWORD}' != 'None'  Login  ${USERNAME}  ${PASSWORD}  ELSE  FAIL