Repository navigation
test: install host storage in module startup fixtures - #152
Conversation
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): test: install host storage in module startup fixtures. Tiny Sweeper completed its review; deterministic results follow. Review snapshot
Completeness: Complete What changedTest-fixture refactor confined to crates/tinymcp/src/tinybus_module/mod_tests.rs. Provider installation is extracted into install_test_provider() (a std::sync::Once-guarded call to crate::storage::install_provider(crate::storage::shared_test_provider())), and a new in_process_bus() helper calls install_test_provider() before MemoryBus::new(); in_process_connection() now builds its bus through in_process_bus(). The counted mock-server test now calls install_test_provider() before constructing its MemoryBus directly. Two standalone startup tests (a_module_that_came_up_answers_a_call_on_its_object_path and a_module_loaded_with_no_configuration_comes_up) switch from MemoryBus::new() to in_process_bus(), and configured_tool_call_runs_confidentially_without_registering_server switches from McpService::new_with_stdio to McpService::with_provider_and_stdio with an explicit per-test std::sync::Arc<crate::storage::MemoryProvider>. The diffstat is 15 additions and 5 deletions in one file; no production code is touched. Features
Tests
FindingsNo active actionable findings. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
The module startup tests that construct their own in-memory bus skipped the host storage provider installed by the shared test-bus helper. Those tests therefore depended on another test having initialized the process-global provider first, and the no-configuration startup case failed when run alone.
Install the shared test provider in the common in-process bus helper and use that helper for the standalone startup cases. Construct the custom stdio service with an explicit test provider as well.
Verification
a_module_loaded_with_no_configuration_comes_upfailed alone before this fixture change withthe host has not installed storage ports.cargo nextest run --manifest-path vendor/tinymcp/Cargo.toml -p tinymcp --no-fail-fast: 1516/1516 passed.Summary by CodeRabbit