internal/proxy/proxytest: use standard transport

proxytest is just used for tests so we don't need opencensus. Remove
the transport and the dependency.

For golang/go#61399

Change-Id: If2ef831deb098c393e625fdc288a8f6015540b48
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/550875
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Bypass: Michael Matloob <matloob@golang.org>
This commit is contained in:
Michael Matloob 2023-12-18 14:39:25 -05:00
Родитель 8d0563ae24
Коммит b2a01f8bdf
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -10,7 +10,6 @@ import (
"strings"
"testing"
"go.opencensus.io/plugin/ochttp"
"golang.org/x/mod/modfile"
"golang.org/x/pkgsite/internal/proxy"
"golang.org/x/pkgsite/internal/testing/testhelper"
@ -37,7 +36,7 @@ func SetupTestClient(t *testing.T, modules []*Module) (*proxy.Client, func()) {
func NewClientForServer(s *Server) (*proxy.Client, func(), error) {
// override client.httpClient to skip TLS verification
httpClient, prox, serverClose := testhelper.SetupTestClientAndServer(s.mux)
client, err := proxy.New(prox.URL, new(ochttp.Transport))
client, err := proxy.New(prox.URL, nil)
if err != nil {
return nil, nil, err
}