mirror of
https://github.com/ovh/debian-cis.git
synced 2024-12-22 22:15:24 +01:00
IMP: Better cleanup after tests
This commit is contained in:
parent
4dc8701132
commit
fe568561bf
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user