mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 21:47:02 +01:00
FIX(tests): improve test cases and cleanup
This commit is contained in:
parent
d18f5edfba
commit
982301d395
@ -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