Feat/livefeed#13
Merged
Merged
Conversation
…MongoDB via Docker Compose
- Created docker-compose.test.yml for isolated test database (MongoDB 6.0 on port 27018) - Updated conftest.py with dual-mode DB fixture (mock vs real via TEST_MODE env var) - Migrated 3 livefeed test files to support both modes (22 tests total): * test_router_streams.py - Router/SSE endpoint tests * test_patient_workflow.py - Patient confirmation flow tests * test_caregiver_workflow.py - Caregiver escalation tests - Added helper functions for dual-mode database operations: * get_alert_events() - Query events in both modes * get_incidents() - Query incidents in both modes * save_incident() - Save incidents in both modes * save_to_db() - Generic save for any collection - All tests pass in both mock (0.5s) and real DB (1.6s) modes - Zero impact on existing test suite (backward compatible) - Added DB_MIGRATION_PROGRESS.md to track migration status
- Added dual-mode helpers (save_incident, get_alert_events) - All 2 tests pass in both mock and real DB modes - Professional workflow (Dispatcher/EMT) authorization and lifecycle tests now fully migrated
- No migration needed - already using proper async patterns - All login, signup, and refresh token tests pass - Total: 47 tests passing across livefeed + auth modules
- Documented all infrastructure changes - Listed all 47 migrated/verified tests - Included technical decisions and learnings - Provided usage instructions and next steps
- Users module: 100% compatible (1 test) - Caregivers module: 86% compatible (31/36 tests passing) - Total: 87 tests passing in real DB mode - 5 caregivers tests need migration work
…ting - Established Docker-based test database infrastructure - Implemented dual-mode test fixture with automatic cleanup - Migrated 222 tests across 8 modules to support real MongoDB - Verified 100% pass rate in both mock and real DB modes
…d fix workflow timer hangs
…ting API endpoint paths
…nore` to exclude deployment keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate tests from in memory to real database (a separate test mongo db)
Update docs and enpoint docs
Get everything in decent note before leaving