Skip to content

Add unit tests for audit logging and sinks, enhance config validation - #77

Merged
Iamsdt merged 1 commit into
mainfrom
feat/audit-log
Nov 10, 2026
Merged

Iamsdt merged 1 commit into
mainfrom
feat/audit-log

Conversation

@Iamsdt

@Iamsdt Iamsdt commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator
  • Introduced comprehensive unit tests for auditing changes in test_audit_changes.py, covering successful and failed operations across various services.
  • Added tests for custom audit sinks and publisher behavior in test_audit_sinks.py, ensuring proper event handling and error counting.
  • Enhanced configuration validation in test_config_editor.py to include audit section checks and error handling for unknown keys.
  • Implemented JSON log format tests in test_json_logs.py, verifying structure and context in log entries.
  • Updated store router tests in test_store_router.py to use MagicMock for memory ID responses, improving test reliability.

- Introduced comprehensive unit tests for auditing changes in `test_audit_changes.py`, covering successful and failed operations across various services.
- Added tests for custom audit sinks and publisher behavior in `test_audit_sinks.py`, ensuring proper event handling and error counting.
- Enhanced configuration validation in `test_config_editor.py` to include audit section checks and error handling for unknown keys.
- Implemented JSON log format tests in `test_json_logs.py`, verifying structure and context in log entries.
- Updated store router tests in `test_store_router.py` to use `MagicMock` for memory ID responses, improving test reliability.
@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.17073% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tenxgraph_api/src/app/core/auth/permissions.py 95.31% 3 Missing ⚠️
tenxgraph_api/cli/commands/audit.py 85.71% 2 Missing ⚠️
tenxgraph_api/src/app/routers/graph/router.py 94.11% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@Iamsdt
Iamsdt merged commit ccf8bb0 into main Nov 10, 2026
9 checks passed
@Iamsdt
Iamsdt deleted the feat/audit-log branch November 10, 2026 13:39
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