X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=tests%2Fos%2Flynis%2Flynis.robot;h=a51af7f1b8cee52eda610add9ff7bd91d3f28ea3;hb=3e9a406ebb1bfe87144abc024136aba695c45398;hp=8d0069a9bc90a29b82f03b2189d13c1049b0cf68;hpb=817ef6bf62837a2a8a2507b0e6e4c9f7ff372240;p=validation.git diff --git a/tests/os/lynis/lynis.robot b/tests/os/lynis/lynis.robot index 8d0069a..a51af7f 100644 --- a/tests/os/lynis/lynis.robot +++ b/tests/os/lynis/lynis.robot @@ -40,11 +40,14 @@ Run Lynis Audit System Append To File ${log} ${stdout}${\n} Should Be Equal As Integers ${rc} 0 + ${status} = Evaluate "Great, no warnings" in """${stdout}""" + Run Keyword If '${status}' == 'False' FAIL Warnings discovered + ... non-critical *** Keywords *** Open Connection And Log In Open Connection ${HOST} - Login With Public Key ${USERNAME} ${SSH_KEYFILE} + Run Keyword IF '${SSH_KEYFILE}' != 'None' Login With Public Key ${USERNAME} ${SSH_KEYFILE} ELSE IF '${PASSWORD}' != 'None' Login ${USERNAME} ${PASSWORD} ELSE FAIL Install Lynis [Documentation] Install Lynis @@ -58,7 +61,9 @@ Uninstall Lynis Download Logs [Documentation] Downloading logs and removing them + Execute Command chmod +r /var/log/lynis.log sudo=True SSHLibrary.Get File /var/log/lynis.log ${OUTPUT DIR}/lynis.log Execute Command rm /var/log/lynis.log sudo=True + Execute Command chmod +r /var/log/lynis-report.dat sudo=True SSHLibrary.Get File /var/log/lynis-report.dat ${OUTPUT DIR}/lynis-report.dat - Execute Command rm /var/log/lynis-report.dat sudo=True \ No newline at end of file + Execute Command rm /var/log/lynis-report.dat sudo=True