FIX(10.2): improve test to check multiple login shells

fix IFS bug
add test
This commit is contained in:
Charles Herlin
2019-08-28 11:47:49 +02:00
parent 89cf484cb9
commit 96f3b74334
2 changed files with 29 additions and 11 deletions

View File

@ -1,10 +1,15 @@
# run-shellcheck
test_audit() {
describe Running on blank host
register_test retvalshouldbe 0
dismiss_count_for_test
register_test retvalshouldbe 1
# shellcheck disable=2154
run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
# TODO fill comprehensive tests
describe correcting situation
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
/opt/debian-cis/bin/hardening/"${script}".sh --apply || true
describe Checking resolved state
register_test retvalshouldbe 0
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
}