Skip to content

Fix duplicate test function declarations in logger package#445

Merged
lpcox merged 2 commits intomainfrom
copilot/run-linting-tests-and-fix-issues
Jan 23, 2026
Merged

Fix duplicate test function declarations in logger package#445
lpcox merged 2 commits intomainfrom
copilot/run-linting-tests-and-fix-issues

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

The logger package had duplicate test function declarations across rpc_logger_test.go and rpc_helpers_test.go, causing compilation failures. Go doesn't allow duplicate function names in the same package, even across test files.

Changes

  • Removed duplicate tests from rpc_logger_test.go:

    • TestTruncateAndSanitize
    • TestExtractEssentialFields

    These functions test rpc_helpers.go and are properly tested in rpc_helpers_test.go.

  • Fixed test assertions in rpc_helpers_test.go:

    • Updated sanitization expectations ("token: ""token=" after normalization)
    • Corrected truncation length calculation (23 → 27 characters)
  • Applied gofmt to fix trailing whitespace in validation_schema.go and rpc_helpers_test.go

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • this-host-does-not-exist-12345.com
    • Triggering command: /tmp/go-build3826922757/b282/mcp.test /tmp/go-build3826922757/b282/mcp.test -test.testlogfile=/tmp/go-build3826922757/b282/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true submodules | head -n 10 -trimpath x_amd64/vet -p mime/quotedprintls-files -lang=go1.25 x_amd64/vet -uns�� anitize common_test.go x_amd64/vet go1.25.6 -c=4 -nolocalimports x_amd64/vet (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Run linting tests and fix any problems found Fix duplicate test function declarations in logger package Jan 23, 2026
Copilot AI requested a review from lpcox January 23, 2026 16:10
@lpcox lpcox marked this pull request as ready for review January 23, 2026 16:22
@lpcox lpcox merged commit c489503 into main Jan 23, 2026
3 checks passed
@lpcox lpcox deleted the copilot/run-linting-tests-and-fix-issues branch January 23, 2026 16:22
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