Introduce 'enroll validate' to check a harvest meets the schema spec and isn't lacking artifacts or contains orphaned ones
Some checks failed
CI / test (push) Failing after 1m47s
Lint / test (push) Successful in 31s
Trivy / test (push) Successful in 23s

This commit is contained in:
Miguel Jacq 2026-01-05 21:17:50 +11:00
parent 45e0d9bb16
commit 66d032d981
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
16 changed files with 1426 additions and 26 deletions

View file

@ -8,21 +8,3 @@ def test_ignore_policy_denies_common_backup_files():
assert pol.deny_reason("/etc/group-") == "backup_file"
assert pol.deny_reason("/etc/something~") == "backup_file"
assert pol.deny_reason("/foobar") == "unreadable"
def test_ignore_policy_deny_reason_link(tmp_path):
pol = IgnorePolicy()
target = tmp_path / "target.txt"
target.write_text("hello", encoding="utf-8")
link = tmp_path / "link.txt"
link.symlink_to(target)
# File is not a symlink.
assert pol.deny_reason_link(str(target)) == "not_symlink"
# Symlink is accepted if readable.
assert pol.deny_reason_link(str(link)) is None
# Missing path should be unreadable.
assert pol.deny_reason_link(str(tmp_path / "missing")) == "unreadable"