mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-25 23:11: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
|
# shellcheck disable=2154
|
||||||
run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||||
|
|
||||||
local test_user="testhomeuser"
|
local test_user="testhomepermuser"
|
||||||
|
|
||||||
describe Tests purposely failing
|
describe Tests purposely failing
|
||||||
useradd --create-home $test_user
|
useradd --create-home $test_user
|
||||||
|
@ -20,5 +20,6 @@ test_audit() {
|
|||||||
run exceptions /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
run exceptions /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
userdel testhomeuser
|
rm -rf /home/testhomeuser
|
||||||
|
userdel -r testhomeuser
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ test_audit() {
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
userdel jeantestuser
|
userdel jeantestuser
|
||||||
userdel jeantest2
|
userdel -r jeantest2
|
||||||
rm -f /tmp/key1 /tmp/key1.pub
|
rm -f /tmp/key1 /tmp/key1.pub
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user