Skip to content

test: keep blocked audit export trail beside the log file - #2068

Merged
FabioLeitao merged 1 commit into
mainfrom
test/audit-export-log-dir
Oct 12, 2026
Merged

FabioLeitao merged 1 commit into
mainfrom
test/audit-export-log-dir

Conversation

@FabioLeitao

Copy link
Copy Markdown
Collaborator

Summary

Risky behavior now covered

configure_audit_log_directory(path.parent) runs before log_audit_trail_finding. Without this test, a later edit can drop that call and the trail goes back to whatever directory the process logger already had (often the working directory), while /logs still returns 422.

Test files

  • tests/test_log_self_scan.py — test_blocked_export_writes_audit_trail_beside_the_exported_file

Test plan

  • uv run pytest tests/test_log_self_scan.py
  • ./scripts/check-all.sh --enforced (exit 0)

The #877 retarget of the audit logger had no regression test. A
logger already pointed elsewhere must not keep the finding.
@FabioLeitao
FabioLeitao merged commit cd2b56b into main Oct 12, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant