Skip to content

test: consolidate running tools test to a tdt - #137

Merged
omarluq merged 1 commit into
mainfrom
omarluq/consolidate-some-tests
Jun 18, 2026
Merged

test: consolidate running tools test to a tdt#137
omarluq merged 1 commit into
mainfrom
omarluq/consolidate-some-tests

Conversation

@omarluq

@omarluq omarluq commented Jun 18, 2026

Copy link
Copy Markdown
Owner

No description provided.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 398bd827-0f69-4f8b-bcd5-511726ef9c6e

📥 Commits

Reviewing files that changed from the base of the PR and between 69da64e and ac4aa16.

📒 Files selected for processing (1)
  • internal/terminal/running_tools_internal_test.go

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Refactored test suite to use table-driven approach for improved maintainability and parallel test execution.

Walkthrough

Refactors internal/terminal/running_tools_internal_test.go by replacing five standalone exported test functions with a single table-driven TestRunningToolBlocks suite. Adds a runningToolBlockTestCase struct, per-scenario case constructors, a shared runRunningToolBlockCase execution helper, and a runningToolBlockNames utility for assertions.

Changes

Running Tool Blocks Test Refactor

Layer / File(s) Summary
Table-driven test harness and name helper
internal/terminal/running_tools_internal_test.go
Removes TestRunningToolBlocksAppendRenderAndRemove, TestApplyStreamedToolStartUsesFallbackForBlankName, TestRemoveRunningToolBlockMatchesNameAndArguments, TestRemoveRunningToolBlockFallsBackToName, and TestResetStreamingBlocksClearsRunningTools. Adds runningToolBlockTestCase struct, TestRunningToolBlocks with parallel subtests over five scenario constructors, runRunningToolBlockCase for shared execution/assertion, and runningToolBlockNames helper returning []string of Call.Name values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 Five tests hopped around, each going alone,
Now they sit at one table, a family grown.
A struct holds their names, their runs, and their want,
Parallel subtests dance — no more duplicate jaunt!
The rabbit refactors, keeps coverage tight,
Table-driven tests fill the warren with light. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to evaluate whether the description relates to the changeset. Add a pull request description explaining the purpose and benefits of consolidating the tests into a table-driven test format.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: consolidating running tools tests into a table-driven test (TDT), which matches the refactoring described in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch omarluq/consolidate-some-tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.39%. Comparing base (69da64e) to head (ac4aa16).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #137   +/-   ##
=======================================
  Coverage   80.38%   80.39%           
=======================================
  Files         278      278           
  Lines       21911    21911           
=======================================
+ Hits        17614    17616    +2     
+ Misses       3083     3082    -1     
+ Partials     1214     1213    -1     
Flag Coverage Δ
unittests 80.39% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@omarluq
omarluq merged commit 76289a8 into main Jun 18, 2026
15 checks passed
@omarluq
omarluq deleted the omarluq/consolidate-some-tests branch June 18, 2026 05:12
@coderabbitai coderabbitai Bot mentioned this pull request Jun 21, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 14, 2026
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