mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
ssa test ci cd
This commit is contained in:
@@ -71,27 +71,27 @@ def main(args):
|
||||
# if not test_result_passed:
|
||||
# sys.exit(1)
|
||||
|
||||
# # test SSA detections
|
||||
# test_results = []
|
||||
# test_passed = True
|
||||
# for test_file in test_files_ssa:
|
||||
# test_obj, attack_data_folder = prepare_test(test_file)
|
||||
# test_result = ssa_detection_testing.test_ssa_detections(test_obj)
|
||||
# test_results.append(test_result.copy())
|
||||
# remove_attack_data(attack_data_folder)
|
||||
# test SSA detections
|
||||
test_results = []
|
||||
test_passed = True
|
||||
for test_file in test_files_ssa:
|
||||
test_obj, attack_data_folder = prepare_test(test_file)
|
||||
test_result = ssa_detection_testing.test_ssa_detections(test_obj)
|
||||
test_results.append(test_result.copy())
|
||||
remove_attack_data(attack_data_folder)
|
||||
|
||||
# LOGGER.info('-----------------------------------')
|
||||
# LOGGER.info('------- test SSA detections -------')
|
||||
# LOGGER.info('-----------------------------------')
|
||||
# for test_result in test_results:
|
||||
# test_passed = test_passed and test_result['result']
|
||||
# LOGGER.info(test_result['msg'])
|
||||
# LOGGER.info('-----------------------------------')
|
||||
LOGGER.info('-----------------------------------')
|
||||
LOGGER.info('------- test SSA detections -------')
|
||||
LOGGER.info('-----------------------------------')
|
||||
for test_result in test_results:
|
||||
test_passed = test_passed and test_result['result']
|
||||
LOGGER.info(test_result['msg'])
|
||||
LOGGER.info('-----------------------------------')
|
||||
|
||||
# if github_service.created_repo:
|
||||
# remove_security_content()
|
||||
# exit_code = not test_passed
|
||||
# sys.exit(exit_code)
|
||||
if github_service.created_repo:
|
||||
remove_security_content()
|
||||
exit_code = not test_passed
|
||||
sys.exit(exit_code)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user