diff --git a/deploy/audit-distfiles.py b/deploy/audit-distfiles.py index 38a4488b..4e165c5d 100644 --- a/deploy/audit-distfiles.py +++ b/deploy/audit-distfiles.py @@ -135,7 +135,8 @@ def scan(overlay, aux=None): GRACE_SECONDS = 7 * 24 * 3600 STATE = os.environ.get("ORPHAN_STATE", "/var/lib/emirrordist/orphans.json") -RECYCLE = os.environ.get("RECYCLE", "/var/lib/emirrordist/recycle") +# Same filesystem as the public distfiles, so recycling is a rename, not a copy. +RECYCLE = os.environ.get("RECYCLE", "/srv/.emirrordist-recycle") RECYCLE_RETENTION_SECONDS = 14 * 24 * 3600 MAX_REAP_SHARE = 1 / 3 MIN_RESTRICTED_TO_DOUBT = 20 diff --git a/tests/test-audit-distfiles.py b/tests/test-audit-distfiles.py index 22bfec23..3aea658b 100644 --- a/tests/test-audit-distfiles.py +++ b/tests/test-audit-distfiles.py @@ -78,10 +78,10 @@ def case(name, fn): CASES.append((name, fn)) -case("孤儿状态、回收目录与清理账本的预设路径不变", lambda: ( +case("孤儿状态、回收目录与清理账本的预设路径", lambda: ( lambda fresh: ( fresh.STATE == "/var/lib/emirrordist/orphans.json" - and fresh.RECYCLE == "/var/lib/emirrordist/recycle" + and fresh.RECYCLE == "/srv/.emirrordist-recycle" and fresh.LEDGER == "/var/lib/emirrordist/reaped.json" ) )(load_audit_with_env({})))