fix: remove duplicate TestWithResponseLogging causing lint failure on merge#1599
Merged
lpcox merged 2 commits intocopilot/fix-duplicate-code-issuesfrom Mar 5, 2026
Conversation
This was referenced Mar 5, 2026
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions workflow lint
fix: remove duplicate TestWithResponseLogging causing lint failure on merge
Mar 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Removes a duplicate Go test function that was causing go vet to fail due to a redeclared in this block error after merging PR #1567 into main.
Changes:
- Deleted the duplicate
TestWithResponseLoggingfrominternal/server/transport_test.goto eliminate the redeclaration.
Comments suppressed due to low confidence (1)
internal/server/transport_test.go:142
- After removing this test, there are no remaining tests in the repo that directly exercise
withResponseLogging(e.g., noTestWithResponseLogging*ininternal/server/http_helpers_test.goor elsewhere). The PR description says a canonical version exists inhttp_helpers_test.go, but it doesn't appear to; please either restore/move the test there (possibly under a different name to avoid redeclaration) or update the PR description if the coverage is intentionally being removed.
// TestCreateHTTPServerForMCP_OAuth tests OAuth discovery endpoint
func TestCreateHTTPServerForMCP_OAuth(t *testing.T) {
tests := []struct {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Mar 5, 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.
The merge of PR #1567 (
copilot/fix-duplicate-code-issues) intomainintroduced a duplicateTestWithResponseLoggingdeclaration — the function existed in bothinternal/server/transport_test.go(added by PR #1567) andinternal/server/http_helpers_test.go(already onmain), causinggo vetto fail withredeclared in this block.Changes
internal/server/transport_test.go— removed the duplicateTestWithResponseLoggingtable-driven test; the canonical version (with additional_PreservesHeadersand_ReturnsHTTPHandlercoverage) lives inhttp_helpers_test.goonmainWarning
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:
example.com/tmp/go-build38872931/b294/launcher.test /tmp/go-build38872931/b294/launcher.test -test.testlogfile=/tmp/go-build38872931/b294/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true p/go-build nMbr/CXVcexE0oORyX_rbnMbr x_amd64/vet(dns block)/tmp/go-build4103510633/b298/launcher.test /tmp/go-build4103510633/b298/launcher.test -test.testlogfile=/tmp/go-build4103510633/b298/testlog.txt -test.paniconexit0 -test.timeout=10m0s /home/REDACTED/.cache/go-build/98/98871f8707f598743bf593e773062a4aa5b2eb977379c9e4b23ff829ed477ad5-d .cfg 64/src/net/cgo_unix.go ache/go/1.25.7/x64/pkg/tool/linu-nilfunc --gdwarf-5 --64 -o ache/go/1.25.7/x64/pkg/tool/linu-tests -o 7689569/b210/_pkg_.a -trimpath 64/pkg/tool/linux_amd64/vet -p crypto/md5 -lang=go1.25 8YH9ufX/ESoPIYBZ-buildtags(dns block)invalid-host-that-does-not-exist-12345.com/tmp/go-build38872931/b276/config.test /tmp/go-build38872931/b276/config.test -test.testlogfile=/tmp/go-build38872931/b276/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo 64/src/crypto/internal/fips140/cgolang.org/x/sys/unix 86_64/as(dns block)/tmp/go-build4103510633/b280/config.test /tmp/go-build4103510633/b280/config.test -test.testlogfile=/tmp/go-build4103510633/b280/testlog.txt -test.paniconexit0 -test.timeout=10m0s -I .cfg 7689569/b164/ x_amd64/vet --gdwarf-5 --64 -o x_amd64/vet 7689�� g_.a rg/x/term@v0.38.-ifaceassert ache/go/1.25.7/x-nilfunc --gdwarf-5 --64 -o ache/go/1.25.7/x-tests(dns block)nonexistent.local/tmp/go-build38872931/b294/launcher.test /tmp/go-build38872931/b294/launcher.test -test.testlogfile=/tmp/go-build38872931/b294/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true p/go-build nMbr/CXVcexE0oORyX_rbnMbr x_amd64/vet(dns block)/tmp/go-build4103510633/b298/launcher.test /tmp/go-build4103510633/b298/launcher.test -test.testlogfile=/tmp/go-build4103510633/b298/testlog.txt -test.paniconexit0 -test.timeout=10m0s /home/REDACTED/.cache/go-build/98/98871f8707f598743bf593e773062a4aa5b2eb977379c9e4b23ff829ed477ad5-d .cfg 64/src/net/cgo_unix.go ache/go/1.25.7/x64/pkg/tool/linu-nilfunc --gdwarf-5 --64 -o ache/go/1.25.7/x64/pkg/tool/linu-tests -o 7689569/b210/_pkg_.a -trimpath 64/pkg/tool/linux_amd64/vet -p crypto/md5 -lang=go1.25 8YH9ufX/ESoPIYBZ-buildtags(dns block)slow.example.com/tmp/go-build38872931/b294/launcher.test /tmp/go-build38872931/b294/launcher.test -test.testlogfile=/tmp/go-build38872931/b294/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true p/go-build nMbr/CXVcexE0oORyX_rbnMbr x_amd64/vet(dns block)/tmp/go-build4103510633/b298/launcher.test /tmp/go-build4103510633/b298/launcher.test -test.testlogfile=/tmp/go-build4103510633/b298/testlog.txt -test.paniconexit0 -test.timeout=10m0s /home/REDACTED/.cache/go-build/98/98871f8707f598743bf593e773062a4aa5b2eb977379c9e4b23ff829ed477ad5-d .cfg 64/src/net/cgo_unix.go ache/go/1.25.7/x64/pkg/tool/linu-nilfunc --gdwarf-5 --64 -o ache/go/1.25.7/x64/pkg/tool/linu-tests -o 7689569/b210/_pkg_.a -trimpath 64/pkg/tool/linux_amd64/vet -p crypto/md5 -lang=go1.25 8YH9ufX/ESoPIYBZ-buildtags(dns block)this-host-does-not-exist-12345.com/tmp/go-build38872931/b303/mcp.test /tmp/go-build38872931/b303/mcp.test -test.testlogfile=/tmp/go-build38872931/b303/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true ache/go/1.25.7/x64/src/runtime/c-p lF2qE-GIF x_amd64/vet(dns block)/tmp/go-build4103510633/b307/mcp.test /tmp/go-build4103510633/b307/mcp.test -test.testlogfile=/tmp/go-build4103510633/b307/testlog.txt -test.paniconexit0 -test.timeout=10m0s swit�� ache/go/1.25.7/x64/src/net 7689569/b164/ 64/pkg/tool/linux_amd64/link -I itize p=/opt/hostedtoo/tmp/go-build4103510633/b001/_pkg_.a 64/pkg/tool/linu-trimpath(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.