Revert "Delete vendor/ and the route proxy's: the build module fetches the modules, the root image builds with -mod=mod (issue 1305, C6)"

This reverts commit 9c4bf1f08b.
This commit is contained in:
2026-10-23 16:37:40 +02:00
parent ff543d3def
commit c5b8fca8bd
1508 changed files with 750323 additions and 31 deletions
+1 -22
View File
@@ -22,27 +22,6 @@ 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)
}
}
// sources are the controller's own Go files that are not tests: what the controller does, not what a test stands in for.
func sources(t *testing.T) map[string]string {
t.Helper()
@@ -51,7 +30,7 @@ func sources(t *testing.T) map[string]string {
if err != nil {
return err
}
if d.IsDir() && (d.Name() == ".git" || d.Name() == "testdata") {
if d.IsDir() && (d.Name() == ".git" || d.Name() == "testdata" || d.Name() == "vendor") {
return filepath.SkipDir
}
if d.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") {
+1 -1
View File
@@ -22,7 +22,7 @@ func TestTheBusTheTestsRunIsTheBusTheMeshRuns(t *testing.T) {
release, from := catalogueBusRelease(t, filepath.Join(beside.Catalogue(t), "nats"))
if release != Version {
t.Errorf("the tests run bus %s and the catalogue's bus image is %s (%s): move go.mod's nats-server pin "+
"with the image", Version, release, from)
"(and `go mod vendor`) with the image", Version, release, from)
}
path := os.Getenv("MESH_FACTS")
if path == "" {