Repository navigation
Add Unit Tests for Tool Info, Tool Info Schema, and 7-Zip Builder - #1184
Conversation
Cover MediaToolInfo comparison and copy, the tool info schema round trip and upgrade refusal, the 7-Zip command builder, and 7-Zip version parsing with file info. These paths run only during a Windows tool update, so no Linux unit, integration, or regression run reaches them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
PR Summary by QodoCover tool metadata, JSON schema, and 7-Zip command behavior
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships |
There was a problem hiding this comment.
🟢 Approval recommended
No active issues are identified, and the change is limited to focused unit tests covering Windows-oriented tool metadata, schema handling, and 7-Zip command construction.
No open issues 🎉
What changed in this PR
Adds focused unit tests for Windows-oriented tool metadata, schema handling, and 7-Zip command construction. The tests improve coverage for logic not exercised by Linux integration or regression runs.
Changes:
- Added
MediaToolInfotests for construction, comparison, copying, and logging. - Added
ToolInfoJsonSchematests for serialization, lookup, null handling, and schema upgrades. - Added 7-Zip tests for command construction, option handling, escaping, and version metadata parsing.
| File | Description |
|---|---|
PlexCleanerTests/ToolInfoJsonSchemaTests.cs |
Covers schema round trips, tool-family lookup, null rejection, and version upgrades. |
PlexCleanerTests/SevenZipToolTests.cs |
Covers 7-Zip command construction, option handling, escaping, and installed-tool version metadata parsing. |
PlexCleanerTests/MediaToolInfoTests.cs |
Covers MediaToolInfo behavior and comparison semantics. |
Review effort: Lite
Adds unit tests for code that only a Windows tool update runs. No Linux unit, integration, or regression run reaches it, so Codecov counts every line of it as missed.
MediaToolInfoTests:CompareToordering for each field, including case-insensitive file name and version, plusCopyandWriteLine.ToolInfoJsonSchemaTests: the file round trip, the null-document refusal,GetToolInfoby tool family, andUpgradeaccepting the current schema and refusing an older one.SevenZipToolTests: the 7-Zip command builder's option order, blank-option skipping, and escaping, the version command, andGetVersionreading the version and file info.This is phase 6 of the coverage plan on the
coveragetrack (#1171), group A. Measured locally, the four files go from 9 to 128 covered lines.SevenZipTool.cskeeps its bootstrap and update paths uncovered, since they download from the network.Verification: the .NET Format chain is clean, and the unit suite passes (517 tests). The local strict review ran twice: the first pass raised 4 findings, all fixed, and the second raised none.
🤖 Generated with Claude Code