mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 13:37:02 +01:00
Rename dismiss_test to skip_tests since test won't even run in this case
This commit is contained in:
parent
47a818b832
commit
bad32f8078
@ -1,6 +1,6 @@
|
|||||||
# run-shellcheck
|
# run-shellcheck
|
||||||
test_audit() {
|
test_audit() {
|
||||||
dismiss_test
|
skip_tests
|
||||||
# shellcheck disable=2154
|
# shellcheck disable=2154
|
||||||
run genconf /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
run genconf /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ tests_list=""
|
|||||||
testno=0
|
testno=0
|
||||||
testcount=0
|
testcount=0
|
||||||
|
|
||||||
dismiss_test=0
|
skip_tests=0
|
||||||
dismiss_count=0
|
dismiss_count=0
|
||||||
nbfailedret=0
|
nbfailedret=0
|
||||||
nbfailedgrep=0
|
nbfailedgrep=0
|
||||||
@ -69,8 +69,9 @@ get_stdout()
|
|||||||
clear_registered_tests() {
|
clear_registered_tests() {
|
||||||
unset REGISTERED_TESTS
|
unset REGISTERED_TESTS
|
||||||
declare -a REGISTERED_TESTS
|
declare -a REGISTERED_TESTS
|
||||||
|
# shellcheck disable=2034
|
||||||
dismiss_count=0
|
dismiss_count=0
|
||||||
dismiss_test=0
|
skip_tests=0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generates a formated test name
|
# Generates a formated test name
|
||||||
@ -84,7 +85,7 @@ make_usecase_name() {
|
|||||||
|
|
||||||
# Plays the registered test suite
|
# Plays the registered test suite
|
||||||
play_registered_tests() {
|
play_registered_tests() {
|
||||||
if [ "$dismiss_test" -eq 1 ]; then
|
if [ "$skip_tests" -eq 1 ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
usecase_name=$1
|
usecase_name=$1
|
||||||
|
@ -67,9 +67,9 @@ contain()
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Do not run tests at all for the next `run`
|
# Do not run tests at all for the next `run`
|
||||||
dismiss_test() {
|
skip_tests() {
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
dismiss_test=1
|
skip_tests=1
|
||||||
}
|
}
|
||||||
|
|
||||||
# test is expected to fail (for instance on blank system)
|
# test is expected to fail (for instance on blank system)
|
||||||
|
Loading…
Reference in New Issue
Block a user