X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=validation.git;a=blobdiff_plain;f=tests%2Fos%2Fvuls%2Fvuls.robot;h=31180217816762a28fdee8e0ea8da503dae7b3fb;hp=01ae1c4516031222bbb1fc2405974c585d181060;hb=HEAD;hpb=a159ef011182e6c93e1d000d69cfb5493797f6ef diff --git a/tests/os/vuls/vuls.robot b/tests/os/vuls/vuls.robot index 01ae1c4..3118021 100644 --- a/tests/os/vuls/vuls.robot +++ b/tests/os/vuls/vuls.robot @@ -43,7 +43,7 @@ Run Vuls test Run Keyword IF '${SSH_KEYFILE}' == 'None' Create ssh_keyfile - ${rc} = Run And Return Rc vuls scan -config ${CURDIR}/config.toml -ssh-config + ${rc} = Run And Return Rc vuls scan -config ${CURDIR}/config.toml Should Be Equal As Integers ${rc} 0 Run Keyword IF '${os}' == 'ubuntu' Run vuls for ubuntu ELSE IF '${os}' == 'centos' Run vuls for centos ELSE FAIL Distro '${os}' not supported @@ -64,7 +64,9 @@ Run vuls for ubuntu Set Global Variable ${LOG} ${output} Run vuls for centos - ${rc} ${output} = Run And Return Rc And Output vuls report -config ${CURDIR}/config.toml -cvedb-sqlite3-path=${CURDIR}/cve.sqlite3 -ovaldb-sqlite3-path=${CURDIR}/oval_centos.sqlite3 -gostdb-sqlite3-path=${CURDIR}/gost_centos.sqlite3 + ${os_version} = SSHLibrary.Execute Command source /etc/os-release && echo $VERSION_ID | cut -d '.' -f1 + + ${rc} ${output} = Run And Return Rc And Output vuls report -config ${CURDIR}/config.toml -cvedb-sqlite3-path=${CURDIR}/cve.sqlite3 -ovaldb-sqlite3-path=${CURDIR}/oval_centos_${os_version}.sqlite3 -gostdb-sqlite3-path=${CURDIR}/gost_centos.sqlite3 Should Be Equal As Integers ${rc} 0 Append To File ${LOG_PATH}/vuls.log ${output}${\n} Set Global Variable ${LOG} ${output} @@ -82,8 +84,6 @@ 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