cmd/go/internal/modfetch: remove references to Fetcher_ in test file

This commit removes references to the global Fetcher_ variable from
the zip sum test file.

Change-Id: I622587f7809f4c6bcd4afbb35312912149b7a3ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/724244
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Ian Alexander 2025-11-24 18:30:50 -05:00
parent da31fd4177
commit 03f499ec46

View file

@ -112,6 +112,7 @@ func TestZipSums(t *testing.T) {
// Download modules with a rate limit. We may run out of file descriptors // Download modules with a rate limit. We may run out of file descriptors
// or cause timeouts without a limit. // or cause timeouts without a limit.
needUpdate := false needUpdate := false
fetcher := modfetch.NewFetcher()
for i := range tests { for i := range tests {
test := &tests[i] test := &tests[i]
name := fmt.Sprintf("%s@%s", strings.ReplaceAll(test.m.Path, "/", "_"), test.m.Version) name := fmt.Sprintf("%s@%s", strings.ReplaceAll(test.m.Path, "/", "_"), test.m.Version)
@ -119,7 +120,7 @@ func TestZipSums(t *testing.T) {
t.Parallel() t.Parallel()
ctx := context.Background() ctx := context.Background()
zipPath, err := modfetch.Fetcher_.DownloadZip(ctx, test.m) zipPath, err := fetcher.DownloadZip(ctx, test.m)
if err != nil { if err != nil {
if *updateTestData { if *updateTestData {
t.Logf("%s: could not download module: %s (will remove from testdata)", test.m, err) t.Logf("%s: could not download module: %s (will remove from testdata)", test.m, err)