docs: add comprehensive rustdoc for testing module#230
Merged
joshrotenberg merged 2 commits intomainfrom Jan 6, 2026
Merged
Conversation
Adds detailed module-level documentation for the testing utilities with examples covering all features and common patterns. Documentation includes: - Why use this module (benefits overview) - Quick start example - Configuration options: - Lifecycle control (stop/remove on drop) - Debugging failed tests (keep_on_panic, capture_logs) - Ready checks (wait_for_ready) - Container reuse for faster local dev - Network support - Fast cleanup with stop timeout - Multi-container tests with ContainerGuardSet - Accessing container information - Common patterns: - Reusable test fixtures - Unique container names for parallel tests - Manual cleanup - Feature flag requirements Closes #224
Comprehensive example showing: - Basic ContainerGuard usage with automatic cleanup - Connection strings for service access - Configuration options (stop timeout, debug mode, reuse) - ContainerGuardSet for multi-container tests - Container info access (logs, IDs) - Test fixture patterns All tests use unique ports for parallel safety.
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.
Summary
Adds detailed module-level documentation for the testing utilities with examples covering all features and common patterns.
Also includes a comprehensive example file (
examples/testing_utilities.rs) that serves as both runnable tests and documentation.Closes #224
Documentation Includes
Why Use This?
Configuration Options
Multi-Container Tests
Accessing Container Information
Common Patterns
Feature Flag Requirements
Example File
Added
examples/testing_utilities.rswith 10 runnable tests demonstrating:Run with:
cargo test --example testing_utilities --features testingPreview
The documentation renders beautifully in rustdoc with proper code highlighting and linked type references.