Skip to content

Move Test Fixtures onto Shared FakeTools Helpers - #1126

Merged
ptr727 merged 1 commit into
developfrom
feature/1124-fake-tools-fixtures
Oct 31, 2026
Merged

ptr727 merged 1 commit into
developfrom
feature/1124-fake-tools-fixtures

Conversation

@ptr727

@ptr727 ptr727 commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Move the remaining test sites onto the shared FakeTools helpers added earlier.

  • SidecarRenameStateTests writes its sample tool data fakes with FakeTools.WriteSampleToolData.
  • SidecarRenameStateTests, ScanStateTests, and VerifyToolErrorTests seed State through the state parameter of FakeTools.CopyUnverifiedSample instead of re-parsing the sidecar.
  • Unused usings left by the move are removed. No production code changes, and every test keeps its assertions.

Closes on promotion: #1124

🤖 Generated with Claude Code

Sidecar rename tests use WriteSampleToolData, and tests that seeded State by
re-parsing the sidecar pass the state to CopyUnverifiedSample instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 31, 2026 14:36
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 327b5332-ee5c-4a6d-8b83-280e37b078f4
Commits

Reviewing files that changed from the base of the PR and between facf268 and b70784d.

Files selected for processing: 3
  • PlexCleanerTests/ScanStateTests.cs
  • PlexCleanerTests/SidecarRenameStateTests.cs
  • PlexCleanerTests/VerifyToolErrorTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@ptr727

ptr727 commented Oct 31, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head b70784da95e1862b88718c3691776b562b4fa206, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Use shared FakeTools helpers for test fixtures

🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Seed sidecar states through FakeTools instead of re-parsing sidecars in three test suites.
• Use shared sample-tool data for the stale-sidecar rename test, removing duplicated fixture setup.
• Preserve test assertions and leave production code unchanged.
Diagram

graph TD
  S["Sample assets"] --> F["FakeTools helpers"] --> C["Seeded sidecar"] --> T["State tests"] --> A["State assertions"]
  F --> W["Fake tool scripts"] --> T
Loading
High-Level Assessment

Using the existing helpers is the best fit: it removes duplicated sidecar editing and fake-tool setup without changing production behavior or test assertions. Retaining the inline setup would preserve unnecessary duplication.

Files changed (3) +31 / -61

Tests (3) +31 / -61
ScanStateTests.csSeed scan-state flags through FakeTools +5/-9

Seed scan-state flags through FakeTools

• Passes the initial state flags to CopyUnverifiedSample in the tool-change test instead of editing the copied sidecar. Removes the unused JSON import.

PlexCleanerTests/ScanStateTests.cs

SidecarRenameStateTests.csShare seeded sidecars and sample tool data +9/-26

Share seeded sidecars and sample tool data

• Seeds Verified through CopyUnverifiedSample in both rename tests. The stale-sidecar test uses WriteSampleToolData instead of constructing tool-data files and scripts inline; the unused utilities import is removed.

PlexCleanerTests/SidecarRenameStateTests.cs

VerifyToolErrorTests.csSeed verification states through FakeTools +17/-26

Seed verification states through FakeTools

• Four verification and repair tests pass their initial flags to CopyUnverifiedSample instead of rewriting sidecar JSON. One file-existence assertion derives the sidecar path from the media path, and the unused JSON import is removed.

PlexCleanerTests/VerifyToolErrorTests.cs

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The reviewed changes are confined to test code that routes state seeding through shared FakeTools helpers while keeping every test's assertions unchanged, and no active issues were found in them.

No open issues 🎉

What changed in this PR

This PR finishes moving the test classes onto the shared FakeTools helpers in PlexCleanerTests/FakeTools.cs. Each test now seeds its sidecar State through the new state parameter of FakeTools.CopyUnverifiedSample, and the sample tool data fakes are written by FakeTools.WriteSampleToolData. The change touches test code only, with no production changes. Each test keeps its assertions.

Changes:

  • Seeds State through the state parameter of FakeTools.CopyUnverifiedSample in the verify-error and scan tests, instead of re-parsing and rewriting the sidecar.
  • Replaces the inline sample-data fake setup in the sidecar rename test with FakeTools.WriteSampleToolData.
  • Removes usings left unused by these changes.
File Description
PlexCleanerTests/​VerifyToolErrorTests.cs Seeds State through CopyUnverifiedSample. Removes the unused System.Text.Json.Nodes using.
PlexCleanerTests/​SidecarRenameStateTests.cs Seeds State through CopyUnverifiedSample and uses WriteSampleToolData for the sample tool fakes. Removes the unused ptr727.Utilities using.
PlexCleanerTests/​ScanStateTests.cs Seeds State through CopyUnverifiedSample. Removes the unused System.Text.Json.Nodes using.

Review effort: Lite

@ptr727
ptr727 merged commit e88a830 into develop Oct 31, 2026
24 checks passed
@ptr727
ptr727 deleted the feature/1124-fake-tools-fixtures branch October 31, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants