Introduce ModSecurityTestContext to encapsulate setup of objects required to execute transactions

- Simplifies memory management on error conditions
- Context will be used in unit tests too, in order to provide
  Transaction related instances.
This commit is contained in:
eduar-hte
2024-05-07 01:29:16 +00:00
committed by Eduardo Arias
parent 9e02b3cf01
commit e313ac7de7
7 changed files with 196 additions and 241 deletions

View File

@@ -171,13 +171,13 @@ endfunction()
# unit tests
file(GLOB unitTestSources ${BASE_DIR}/test/unit/*.cc)
add_executable(unit_tests ${unitTestSources})
add_executable(unit_tests ${unitTestSources} ${BASE_DIR}/test/common/custom_debug_log.cc)
setTestTargetProperties(unit_tests)
target_compile_options(unit_tests PRIVATE /wd4805)
# regression tests
file(GLOB regressionTestsSources ${BASE_DIR}/test/regression/*.cc)
add_executable(regression_tests ${regressionTestsSources})
add_executable(regression_tests ${regressionTestsSources} ${BASE_DIR}/test/common/custom_debug_log.cc)
setTestTargetProperties(regression_tests)
macro(add_regression_test_capability compile_definition flag)