Test that the shipped data stays under 100 MiB and that publish_release.py stops on a tag at another commit, both in the gate

This commit is contained in:
2026-10-12 17:35:58 +02:00
committed by Lillem4n
parent 95af089778
commit 2c9ff3b014
4 changed files with 107 additions and 1 deletions
+22
View File
@@ -2,6 +2,7 @@ package fejkdata
import (
"io/fs"
"os"
"reflect"
"slices"
"strings"
@@ -18,6 +19,27 @@ func TestABareNewFailsNamingWithDataFS(t *testing.T) {
}
}
func TestShippedDataStaysUnder100MiB(t *testing.T) {
var size int64
err := fs.WalkDir(os.DirFS("data"), ".", func(path string, d fs.DirEntry, err error) error {
if err != nil || d.IsDir() {
return err
}
info, err := d.Info()
if err != nil {
return err
}
size += info.Size()
return nil
})
if err != nil {
t.Fatal(err)
}
if size > 100<<20 {
t.Errorf("data/ holds %d bytes, over 100 MiB: carry out todo.md item 193, moving the largest packages into nested Go modules", size)
}
}
func TestEveryShippedModuleLoads(t *testing.T) {
f, err := New(withShipped(), WithSeed(1))
if err != nil {