FIX(tests): improve test cases and cleanup

This commit is contained in:
Charles Herlin 2019-02-18 17:25:04 +01:00
parent f2ae6cc24a
commit c6ea07dd2a
3 changed files with 9 additions and 1 deletions

View File

@ -6,5 +6,11 @@ test_audit() {
# shellcheck disable=2154
run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
echo "TMOUT=600" > /etc/profile.d/CIS_99.1_timeout.sh
describe compliant
register_test retvalshouldbe 0
run compliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
# TODO fill comprehensive tests
}

View File

@ -1,7 +1,7 @@
# run-shellcheck
test_audit() {
mkdir /etc/udev/rules.d
mkdir /etc/udev/rules.d || true
chmod -R 700 /etc/udev
describe Running on blank host

View File

@ -45,6 +45,8 @@ test_audit() {
register_test retvalshouldbe 0
run allwdfromip /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
# Cleanup
userdel jeantestuser
rm -f /tmp/key1 /tmp/key1.pub
}