docs: add plan for refactoring tests.rs into multiple files
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
75
PLAN.md
75
PLAN.md
@@ -0,0 +1,75 @@
|
||||
# Test Refactoring Plan
|
||||
|
||||
This document outlines the steps to refactor `tests.rs` into multiple files and expand test coverage across the codebase.
|
||||
|
||||
## Phase 1: Refactor Existing Tests
|
||||
|
||||
1. **Split compression tests into separate module files**
|
||||
- Files to update:
|
||||
- `src/tests.rs` (remove compression_tests module)
|
||||
- Files to add:
|
||||
- `src/tests/compression/mod.rs`
|
||||
- `src/tests/compression/gzip_tests.rs`
|
||||
- `src/tests/compression/lz4_tests.rs`
|
||||
- `src/tests/compression/none_tests.rs`
|
||||
|
||||
2. **Split compression type tests into separate module files**
|
||||
- Files to update:
|
||||
- `src/tests.rs` (remove compression_type_tests module)
|
||||
- Files to add:
|
||||
- `src/tests/compression/types/mod.rs`
|
||||
- `src/tests/compression/types/factory_tests.rs`
|
||||
- `src/tests/compression/types/conversion_tests.rs`
|
||||
|
||||
3. **Create test module structure**
|
||||
- Files to add:
|
||||
- `src/tests/mod.rs` (main test module file)
|
||||
- `src/tests/common/mod.rs`
|
||||
|
||||
## Phase 2: Add Tests for Other Modules
|
||||
|
||||
4. **Add database tests**
|
||||
- Files to add:
|
||||
- `src/tests/db/mod.rs`
|
||||
- `src/tests/db/item_tests.rs`
|
||||
- `src/tests/db/tag_tests.rs`
|
||||
- `src/tests/db/meta_tests.rs`
|
||||
|
||||
5. **Add meta plugin tests**
|
||||
- Files to add:
|
||||
- `src/tests/meta_plugin/mod.rs`
|
||||
- `src/tests/meta_plugin/system_tests.rs`
|
||||
- `src/tests/meta_plugin/digest_tests.rs`
|
||||
- `src/tests/meta_plugin/program_tests.rs`
|
||||
|
||||
6. **Add compression engine tests**
|
||||
- Files to add:
|
||||
- `src/tests/compression_engine/mod.rs`
|
||||
- `src/tests/compression_engine/program_tests.rs`
|
||||
|
||||
7. **Add mode tests**
|
||||
- Files to add:
|
||||
- `src/tests/modes/mod.rs`
|
||||
- `src/tests/modes/save_tests.rs`
|
||||
- `src/tests/modes/get_tests.rs`
|
||||
- `src/tests/modes/list_tests.rs`
|
||||
- `src/tests/modes/delete_tests.rs`
|
||||
- `src/tests/modes/update_tests.rs`
|
||||
- `src/tests/modes/info_tests.rs`
|
||||
- `src/tests/modes/status_tests.rs`
|
||||
- `src/tests/modes/diff_tests.rs`
|
||||
|
||||
8. **Add server tests**
|
||||
- Files to add:
|
||||
- `src/tests/server/mod.rs`
|
||||
- `src/tests/server/api_tests.rs`
|
||||
- `src/tests/server/auth_tests.rs`
|
||||
|
||||
9. **Add utility tests**
|
||||
- Files to add:
|
||||
- `src/tests/common/is_binary_tests.rs`
|
||||
- `src/tests/common/status_tests.rs`
|
||||
|
||||
10. **Update main test module**
|
||||
- Files to update:
|
||||
- `src/tests/mod.rs` (add all test module declarations)
|
||||
|
||||
Reference in New Issue
Block a user