forked from p15670423/monkey
Island: Add unit test leaving no readme if no target dir
This commit is contained in:
parent
69754205d0
commit
80050b89e6
|
@ -244,3 +244,16 @@ def test_readme_already_exists(
|
|||
).run_payload()
|
||||
|
||||
mock_copy_file.assert_not_called()
|
||||
|
||||
|
||||
def test_no_readme_if_no_directory(
|
||||
build_ransomware_payload, ransomware_payload_config, ransomware_target
|
||||
):
|
||||
ransomware_payload_config["encryption"]["enabled"] = True
|
||||
ransomware_payload_config["encryption"]["directories"]["linux_target_dir"] = ""
|
||||
ransomware_payload_config["encryption"]["directories"]["windows_target_dir"] = ""
|
||||
ransomware_payload_config["other_behaviors"]["readme"] = True
|
||||
ransomware_payload = build_ransomware_payload(ransomware_payload_config)
|
||||
|
||||
ransomware_payload.run_payload()
|
||||
assert not Path(ransomware_target / README_DEST).exists()
|
||||
|
|
Loading…
Reference in New Issue