mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Add support for disabling test cases.
The JSON test case format has an "enabled" key that is not currently being honored. This trivial patch adds support for skipping test cases that has enabled set to 0.
This commit is contained in:
parent
c22658ec80
commit
ab14b7c083
@ -93,8 +93,11 @@ void perform_unit_test(ModSecurityTest<RegressionTest> *test,
|
||||
std::vector<RegressionTest *> *tests,
|
||||
ModSecurityTestResults<RegressionTestResult> *res, int *count) {
|
||||
|
||||
|
||||
for (RegressionTest *t : *tests) {
|
||||
if (t->enabled == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
CustomDebugLog *debug_log = new CustomDebugLog();
|
||||
modsecurity::ModSecurity *modsec = NULL;
|
||||
modsecurity::Rules *modsec_rules = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user