29 lines
709 B
Go
29 lines
709 B
Go
package manifest
|
|
|
|
import (
|
|
"io/fs"
|
|
"os"
|
|
"path/filepath"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// The seat the assigner holds is mesh-module-assigner (novox/hq ADR 0634 §9): no message, tool text or comment of the module
|
|
// says the name it had before.
|
|
func TestNoTextSaysTheOldSeatName(t *testing.T) {
|
|
old := "mesh-" + "assignments"
|
|
err := filepath.WalkDir(".", func(path string, d fs.DirEntry, err error) error {
|
|
if err != nil || d.IsDir() || !strings.HasSuffix(path, ".go") || path == "oldseat_test.go" {
|
|
return err
|
|
}
|
|
raw, err := os.ReadFile(path)
|
|
if err == nil && strings.Contains(string(raw), old) {
|
|
t.Errorf("%s still says %s", path, old)
|
|
}
|
|
return err
|
|
})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|