Skip to content

Commit f168edb

Browse files
Copilotlpcox
andcommitted
Fix gofmt formatting in connection_test.go
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 7e7dffc commit f168edb

1 file changed

Lines changed: 42 additions & 42 deletions

File tree

internal/mcp/connection_test.go

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -706,47 +706,47 @@ func TestNewHTTPConnection(t *testing.T) {
706706

707707
// TestIsHTTPConnectionError tests the HTTP connection error detection helper
708708
func TestIsHTTPConnectionError(t *testing.T) {
709-
tests := []struct {
710-
name string
711-
err error
712-
expected bool
713-
}{
714-
{
715-
name: "nil error",
716-
err: nil,
717-
expected: false,
718-
},
719-
{
720-
name: "connection refused error",
721-
err: fmt.Errorf("dial tcp: connection refused"),
722-
expected: true,
723-
},
724-
{
725-
name: "no such host error",
726-
err: fmt.Errorf("dial tcp: lookup example.invalid: no such host"),
727-
expected: true,
728-
},
729-
{
730-
name: "network is unreachable error",
731-
err: fmt.Errorf("dial tcp: network is unreachable"),
732-
expected: true,
733-
},
734-
{
735-
name: "other error",
736-
err: fmt.Errorf("some other error"),
737-
expected: false,
738-
},
739-
{
740-
name: "timeout error",
741-
err: fmt.Errorf("context deadline exceeded"),
742-
expected: false,
743-
},
744-
}
709+
tests := []struct {
710+
name string
711+
err error
712+
expected bool
713+
}{
714+
{
715+
name: "nil error",
716+
err: nil,
717+
expected: false,
718+
},
719+
{
720+
name: "connection refused error",
721+
err: fmt.Errorf("dial tcp: connection refused"),
722+
expected: true,
723+
},
724+
{
725+
name: "no such host error",
726+
err: fmt.Errorf("dial tcp: lookup example.invalid: no such host"),
727+
expected: true,
728+
},
729+
{
730+
name: "network is unreachable error",
731+
err: fmt.Errorf("dial tcp: network is unreachable"),
732+
expected: true,
733+
},
734+
{
735+
name: "other error",
736+
err: fmt.Errorf("some other error"),
737+
expected: false,
738+
},
739+
{
740+
name: "timeout error",
741+
err: fmt.Errorf("context deadline exceeded"),
742+
expected: false,
743+
},
744+
}
745745

746-
for _, tt := range tests {
747-
t.Run(tt.name, func(t *testing.T) {
748-
result := isHTTPConnectionError(tt.err)
749-
assert.Equal(t, tt.expected, result, "isHTTPConnectionError should return %v for %v", tt.expected, tt.err)
750-
})
751-
}
746+
for _, tt := range tests {
747+
t.Run(tt.name, func(t *testing.T) {
748+
result := isHTTPConnectionError(tt.err)
749+
assert.Equal(t, tt.expected, result, "isHTTPConnectionError should return %v for %v", tt.expected, tt.err)
750+
})
751+
}
752752
}

0 commit comments

Comments
 (0)