Delete the committed dependencies; builds resolve by go.sum (issue 1305)

This commit is contained in:
2026-10-23 22:16:09 +02:00
parent 12dd2bb3f0
commit 05c872485a
1517 changed files with 35 additions and 750327 deletions
+27
View File
@@ -0,0 +1,27 @@
package main
import (
"os"
"path/filepath"
"strings"
"testing"
)
// 1305/AC1: the tree holds no vendor directory (root and modules/route-proxy), .gitignore names vendor/, and the root
// Dockerfile builds with -mod=mod.
func TestTheTreeCommitsNoDependencies(t *testing.T) {
root := filepath.Join("..", "..")
for _, d := range []string{"vendor", filepath.Join("modules", "route-proxy", "vendor")} {
if _, err := os.Stat(filepath.Join(root, d)); err == nil {
t.Errorf("%s is committed", d)
}
}
ignore, err := os.ReadFile(filepath.Join(root, ".gitignore"))
if err != nil || !strings.Contains(string(ignore), "\nvendor/\n") {
t.Errorf(".gitignore does not name vendor/: %v", err)
}
docker, err := os.ReadFile(filepath.Join(root, "Dockerfile"))
if err != nil || strings.Contains(string(docker), "-mod=vendor") || !strings.Contains(string(docker), "-mod=mod") {
t.Errorf("the Dockerfile does not build with -mod=mod: %v", err)
}
}