Replace CIS_ROOT_DIR by a more flexible system (#204)

* Replace CIS_ROOT_DIR by a more flexible system

* Try to adapt the logic change to the functional tests
This commit is contained in:
P-EB
2023-09-25 14:24:01 +02:00
committed by GitHub
parent 5370ec2ef6
commit 32886d3a3d
493 changed files with 2060 additions and 2056 deletions

View File

@ -4,19 +4,19 @@ test_audit() {
describe Running on blank host
register_test retvalshouldbe 0
# shellcheck disable=2154
run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
run blank "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
ln -s /dev/shm /run/shm
describe Partition symlink
register_test retvalshouldbe 0
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
run resolved "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
echo "dummy entry" >>/etc/fstab
describe Fstab with a real entry to match runtime partitions
register_test retvalshouldbe 0
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
run resolved "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
# Cleanup
rm /run/shm