]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/modfetch: remove references to Fetcher_ in test file
authorIan Alexander <jitsu@google.com>
Mon, 24 Nov 2025 23:30:50 +0000 (18:30 -0500)
committerIan Alexander <jitsu@google.com>
Wed, 26 Nov 2025 03:17:11 +0000 (19:17 -0800)
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>
src/cmd/go/internal/modfetch/zip_sum_test/zip_sum_test.go

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