More hardening measures
This commit is contained in:
parent
a9d56b66c5
commit
be1f9940a5
22 changed files with 902 additions and 162 deletions
|
|
@ -123,3 +123,15 @@ def test_process_directory_ini_union_marks_optional_sections_and_keys(tmp_path:
|
|||
def test_process_directory_rejects_empty_folder(tmp_path: Path):
|
||||
with pytest.raises(ValueError, match="No supported config files"):
|
||||
process_directory(tmp_path, recursive=False, role_prefix="role")
|
||||
|
||||
|
||||
def test_directory_mode_skips_supported_symlinks(tmp_path: Path):
|
||||
outside = tmp_path / "outside.yaml"
|
||||
outside.write_text("secret: value\n", encoding="utf-8")
|
||||
root = tmp_path / "root"
|
||||
root.mkdir()
|
||||
(root / "real.yaml").write_text("name: ok\n", encoding="utf-8")
|
||||
(root / "link.yaml").symlink_to(outside)
|
||||
|
||||
files = iter_supported_files(root, recursive=False)
|
||||
assert files == [root / "real.yaml"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue