1
0
mirror of https://github.com/ovh/debian-cis.git synced 2025-03-29 07:06:06 +01:00

IMP: Better cleanup after tests

This commit is contained in:
Thibault Ayanides 2020-11-05 10:13:14 +01:00
parent 4dc8701132
commit fe568561bf
3 changed files with 4 additions and 3 deletions

@ -6,7 +6,7 @@ test_audit() {
# shellcheck disable=2154
run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
local test_user="testhomeuser"
local test_user="testhomepermuser"
describe Tests purposely failing
useradd --create-home $test_user

@ -20,5 +20,6 @@ test_audit() {
run exceptions /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
# Cleanup
userdel testhomeuser
rm -rf /home/testhomeuser
userdel -r testhomeuser
}

@ -71,7 +71,7 @@ test_audit() {
# Cleanup
userdel jeantestuser
userdel jeantest2
userdel -r jeantest2
rm -f /tmp/key1 /tmp/key1.pub
}