tractatus/tests
TheFlow ba6722f256 fix(tests): update MemoryProxy tests for v3 MongoDB architecture
PROBLEM: Tests written for filesystem-based v1/v2, but service refactored to MongoDB v3
- 18/25 tests failing (expected filesystem, got MongoDB)
- Tests checking for .json files that no longer exist
- Response format mismatches (rulesStored vs inserted/modified)

SOLUTION: Complete test rewrite for MongoDB architecture
- Use GovernanceRule and AuditLog models directly
- Test data isolation with test_ prefix and cleanup hooks
- Updated assertions for MongoDB response formats
- Filter results to exclude non-test data from tractatus_test DB
- Removed filesystem-specific tests (directory creation, file I/O)

RESULT: 26/26 tests passing in 1.079s (from 7/25 in 250s timeout)

Tests now verify:
✓ MongoDB persistence and retrieval
✓ Rule filtering (quadrant, persistence)
✓ Cache management (TTL, clear, stats)
✓ Audit logging to MongoDB
✓ Data integrity across persist/load cycles

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 12:14:57 +13:00
..
helpers fix: add Jest test infrastructure and reduce test failures from 29 to 13 2025-10-09 20:37:45 +13:00
integration fix(mongodb): resolve production connection drops and add governance sync system 2025-10-21 11:39:05 +13:00
poc/memory-tool feat: Phase 5 PoC Week 3 - MemoryProxy integration with Tractatus services 2025-10-10 12:22:06 +13:00
unit fix(tests): update MemoryProxy tests for v3 MongoDB architecture 2025-10-21 12:14:57 +13:00
setup.js fix: add Jest test infrastructure and reduce test failures from 29 to 13 2025-10-09 20:37:45 +13:00