mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-26 07:21:22 +01:00
FIX(tests): improve test cases and cleanup
This commit is contained in:
parent
f2ae6cc24a
commit
c6ea07dd2a
@ -6,5 +6,11 @@ test_audit() {
|
|||||||
# shellcheck disable=2154
|
# shellcheck disable=2154
|
||||||
run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
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
|
# TODO fill comprehensive tests
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# run-shellcheck
|
# run-shellcheck
|
||||||
test_audit() {
|
test_audit() {
|
||||||
|
|
||||||
mkdir /etc/udev/rules.d
|
mkdir /etc/udev/rules.d || true
|
||||||
chmod -R 700 /etc/udev
|
chmod -R 700 /etc/udev
|
||||||
|
|
||||||
describe Running on blank host
|
describe Running on blank host
|
||||||
|
@ -45,6 +45,8 @@ test_audit() {
|
|||||||
register_test retvalshouldbe 0
|
register_test retvalshouldbe 0
|
||||||
run allwdfromip /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
run allwdfromip /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
userdel jeantestuser
|
userdel jeantestuser
|
||||||
|
rm -f /tmp/key1 /tmp/key1.pub
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user