forked from p15670423/monkey
IT: Speed up ransomware extension test by disabling readme feature
Reduces the runtime from 1.25s to under 0.005s
This commit is contained in:
parent
19d6333f2c
commit
9fb0532646
|
@ -15,10 +15,14 @@ def ransomware_options_dict(ransomware_file_extension):
|
||||||
|
|
||||||
def test_uses_correct_extension(ransomware_options_dict, tmp_path, ransomware_file_extension):
|
def test_uses_correct_extension(ransomware_options_dict, tmp_path, ransomware_file_extension):
|
||||||
target_dir = tmp_path
|
target_dir = tmp_path
|
||||||
|
|
||||||
|
# Leaving a readme is slow and not relevant for this test
|
||||||
|
ransomware_options_dict["other_behaviors"]["readme"] = False
|
||||||
ransomware_directories = ransomware_options_dict["encryption"]["directories"]
|
ransomware_directories = ransomware_options_dict["encryption"]["directories"]
|
||||||
ransomware_directories["linux_target_dir"] = target_dir
|
ransomware_directories["linux_target_dir"] = target_dir
|
||||||
ransomware_directories["windows_target_dir"] = target_dir
|
ransomware_directories["windows_target_dir"] = target_dir
|
||||||
ransomware = ransomware_builder.build_ransomware(ransomware_options_dict)
|
ransomware = ransomware_builder.build_ransomware(ransomware_options_dict)
|
||||||
|
|
||||||
file = target_dir / "file.txt"
|
file = target_dir / "file.txt"
|
||||||
file.write_text("Do your worst!")
|
file.write_text("Do your worst!")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue