Skip to content

test: remove redundant and ineffective Go tests - #4974

Merged
dgageot merged 18 commits into
mainfrom
worktree-board-29ea1d6234bc7b4c
Nov 19, 2026
Merged

dgageot merged 18 commits into
mainfrom
worktree-board-29ea1d6234bc7b4c

Conversation

@dgageot

@dgageot dgageot commented Nov 19, 2026

Copy link
Copy Markdown
Member

Remove duplicate tests and tests that only asserted on their own fixtures. Replace ineffective Bedrock usage and telemetry assertions with checks against production paths while retaining behavior coverage. No production code changes.

Validation: task build, task test, and task lint passed. No previously covered production blocks were lost in affected packages; targeted mutation checks were also performed.

Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot
dgageot requested a review from a team as a code owner November 19, 2026 09:39
Copilot AI balanced review requested due to automatic review settings November 19, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for this test-only cleanup.

No open issues 🎉

What changed in this PR

This PR streamlines docker-agent’s Go tests by removing redundant checks and assertions on test-only logic, while replacing selected checks with tests of production behavior. No production code changes are included.

Changes:

  • Remove duplicate tests and consolidate overlapping session and configuration checks.
  • Test Bedrock token usage conversion through the stream adapter.
  • Strengthen telemetry assertions and use deterministic synchronization for asynchronous tracking.
File Description
pkg/​tui/​components/​sidebar/​layout_test.go Remove a scrollbar test that manually constructs its output.
pkg/​tools/​builtin/​todo/​todo_test.go Remove redundant full-state update coverage.
pkg/​telemetry/​telemetry_test.go Replace test-only wrappers and strengthen HTTP and tag assertions.
pkg/​session/​store_test.go Consolidate absolute session-ID checks into a store-independent test.
pkg/​session/​session_options_test.go Remove a comparison of identically configured test sessions.
pkg/​runtime/​fallback_test.go Remove duplicate rate-limit retry coverage.
pkg/​runtime/​commands_test.go Remove redundant argument interpolation coverage.
pkg/​model/​provider/​options/​options_test.go Remove a duplicate transport-wrapper test.
pkg/​model/​provider/​bedrock/​client_test.go Remove simulated usage conversion and duplicate content checks.
pkg/​model/​provider/​bedrock/​adapter_test.go Add production-path usage conversion tests, including omitted counts.
pkg/​history/​history_test.go Remove duplicate beginning-of-history coverage.
pkg/​environment/​credential_helper_test.go Remove a constructor field-assignment test.
pkg/​config/​sources_test.go Consolidate missing-credential tests and remove an ineffective authorization check.
pkg/​app/​app_working_dir_test.go Consolidate session-option preservation checks, including allowed directories.
pkg/​app/​app_test.go Remove individual flag-preservation tests covered by the consolidated test.

Review effort: Balanced

@dgageot
dgageot added this pull request to the merge queue Nov 19, 2026
@aheritier aheritier added area/testing Test infrastructure, CI/CD, test runners, evaluation kind/test Test-only changes labels Nov 19, 2026
Merged via the queue into main with commit 8c6096f Nov 19, 2026
18 checks passed
@dgageot
dgageot deleted the worktree-board-29ea1d6234bc7b4c branch November 19, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Test infrastructure, CI/CD, test runners, evaluation kind/test Test-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants