Skip to content

Fix duplicate test functions in config validation tests#4156

Merged
lpcox merged 1 commit intomainfrom
fix/duplicate-test-trusted-bots
Apr 19, 2026
Merged

Fix duplicate test functions in config validation tests#4156
lpcox merged 1 commit intomainfrom
fix/duplicate-test-trusted-bots

Conversation

@lpcox
Copy link
Copy Markdown
Collaborator

@lpcox lpcox commented Apr 19, 2026

Three test functions were declared in both validation_otel_test.go and validation_gateway_coverage_test.go, causing go vet to fail with redeclaration errors:

  • TestValidateTrustedBots
  • TestValidateGatewayConfig_OpenTelemetry
  • TestValidateGatewayConfig_TrustedBots

The validation_gateway_coverage_test.go versions are more comprehensive (extra edge cases like tab-only entries, invalid spanId, service name), so this PR removes the duplicates from validation_otel_test.go.

Verified: make agent-finished passes (format, build, lint, all tests).

TestValidateTrustedBots, TestValidateGatewayConfig_OpenTelemetry, and
TestValidateGatewayConfig_TrustedBots were declared in both
validation_otel_test.go and validation_gateway_coverage_test.go. The
gateway coverage versions are more comprehensive (extra edge cases),
so remove the duplicates from validation_otel_test.go.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 19, 2026 21:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes duplicate test function declarations in internal/config to resolve go vet redeclaration failures, keeping the more comprehensive test coverage in validation_gateway_coverage_test.go.

Changes:

  • Deleted the duplicate TestValidateTrustedBots from validation_otel_test.go.
  • Deleted the duplicate TestValidateGatewayConfig_OpenTelemetry and TestValidateGatewayConfig_TrustedBots from validation_otel_test.go.
  • Left brief in-file pointers indicating where the tests now live.
Show a summary per file
File Description
internal/config/validation_otel_test.go Removes duplicate test functions that were redeclared in validation_gateway_coverage_test.go, resolving go vet failures.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@lpcox lpcox merged commit cf4fde7 into main Apr 19, 2026
24 checks passed
@lpcox lpcox deleted the fix/duplicate-test-trusted-bots branch April 19, 2026 21:57
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