aboutsummaryrefslogtreecommitdiff
path: root/internal/fetchdatasource/fetchdatasource_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fetchdatasource/fetchdatasource_test.go')
-rw-r--r--internal/fetchdatasource/fetchdatasource_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/fetchdatasource/fetchdatasource_test.go b/internal/fetchdatasource/fetchdatasource_test.go
index 8f931053..d913ad78 100644
--- a/internal/fetchdatasource/fetchdatasource_test.go
+++ b/internal/fetchdatasource/fetchdatasource_test.go
@@ -25,6 +25,7 @@ import (
"golang.org/x/pkgsite/internal/proxy/proxytest"
"golang.org/x/pkgsite/internal/source"
"golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testenv"
"golang.org/x/pkgsite/internal/testing/testhelper"
"golang.org/x/pkgsite/internal/version"
)
@@ -428,6 +429,11 @@ func TestLocalGetUnitMeta(t *testing.T) {
},
} {
t.Run(test.path, func(t *testing.T) {
+ if test.modulePath == stdlib.ModulePath {
+ // FetchModule for the stdlib calls stdlib.Versions which makes a network
+ // call to go.googlesource.com for the Go git repo.
+ testenv.MustHaveExternalNetwork(t)
+ }
got, err := ds.GetUnitMeta(ctx, test.path, test.modulePath, fetch.LocalVersion)
if test.wantErr != nil {
if !errors.Is(err, test.wantErr) {