Skip to content

Clean up TestServer test library#87

Merged
oalders merged 2 commits into
masterfrom
testserver-cleanup
May 16, 2026
Merged

Clean up TestServer test library#87
oalders merged 2 commits into
masterfrom
testserver-cleanup

Conversation

@oalders
Copy link
Copy Markdown
Member

@oalders oalders commented May 16, 2026

Two small, independent cleanups to the t/lib/TestServer* test library. Both are test-only and behavior-preserving.

Remove unused var in test lib

TestServer::perl_cmd declared my @libs = $self->lib_dirs; and never used it — the loop just below calls $self->lib_dirs directly.

Simplify dispatch() interface to ($c, $r)

dispatch() was called as dispatch($c, $r->method, $r->uri, $r), but $method and $uri are plain accessors on the request object $r. Pass only ($c, $r) and let each dispatch() implementation derive method/uri where it needs them. This also drops $method from TestServer::Reflect::dispatch, which unpacked it but never used it.

🤖 Generated with Claude Code

oalders and others added 2 commits May 16, 2026 00:43
dispatch() was called with ($c, $r->method, $r->uri, $r), but method
and uri are plain accessors on the request object. Pass only ($c, $r)
and let each dispatch() implementation derive method/uri where needed.
This also drops $method from TestServer::Reflect::dispatch, which
unpacked it but never used it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 8.57%. Comparing base (b3d2084) to head (c678d98).

Additional details and impacted files
@@          Coverage Diff           @@
##           master     #87   +/-   ##
======================================
  Coverage    8.57%   8.57%           
======================================
  Files           1       1           
  Lines         338     338           
  Branches       86      86           
======================================
  Hits           29      29           
  Misses        304     304           
  Partials        5       5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oalders oalders merged commit c69cdd0 into master May 16, 2026
36 checks passed
@oalders oalders deleted the testserver-cleanup branch May 16, 2026 01:21
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.

1 participant