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:
Lasse Karstensen
2017-07-27 13:20:40 +02:00
committed by Felipe Zimmerle
parent c22658ec80
commit ab14b7c083

View File

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