From 38f135ee8151f7adb208bb1fcb5dd39738fa8d97 Mon Sep 17 00:00:00 2001 From: pyth0n1c <87383215+pyth0n1c@users.noreply.github.com> Date: Mon, 19 Sep 2022 15:46:00 -0700 Subject: [PATCH] Remove data after a single detection is tested instead of when all detections have finished testing. --- bin/docker_detection_tester/modules/testing_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/docker_detection_tester/modules/testing_service.py b/bin/docker_detection_tester/modules/testing_service.py index dbfcad65cf..7511de18a0 100644 --- a/bin/docker_detection_tester/modules/testing_service.py +++ b/bin/docker_detection_tester/modules/testing_service.py @@ -354,6 +354,7 @@ def test_detection(splunk_ip:str, splunk_port:int, splunk_password:str, detectio abs_folder_path = mkdtemp(prefix="DATA_", dir=attack_data_root_folder) success = execute_tests(splunk_ip, splunk_port, splunk_password, detection.testFile.tests, abs_folder_path, wait_on_failure, wait_on_completion, container) + os.removedirs(abs_folder_path) detection.get_detection_result() #Delete the folder and all of the data inside of it #shutil.rmtree(abs_folder_path)