Repository navigation
test: remove redundant and ineffective Go tests - #4974
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
🟢 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
rumpl
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andtask lintpassed. No previously covered production blocks were lost in affected packages; targeted mutation checks were also performed.