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

View File

@ -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

View File

@ -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
}

View File

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