Delete vendor/ and the route proxy's: the build module fetches the modules, the root image builds with -mod=mod (issue 1305, C6)
This commit is contained in:
@@ -20,3 +20,24 @@ func TestTheRepositoryHoldsNoMergeCheckScript(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No module of this repository keeps a copy of its dependencies (issue 1305): the build module fetches them, and
|
||||
// `go build ./...` with GOFLAGS=-mod=mod is how every build reads them.
|
||||
func TestTheRepositoryHoldsNoVendorDirectory(t *testing.T) {
|
||||
err := filepath.WalkDir(root, func(path string, d os.DirEntry, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if d.IsDir() && d.Name() == ".git" {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
if d.IsDir() && d.Name() == "vendor" {
|
||||
t.Errorf("%s is a vendor directory: dependencies are fetched, never kept (issue 1305)", path)
|
||||
return filepath.SkipDir
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user