Merge pull request 'Name the build test's fixture manifest module.json.fixture, so no reader takes it for a module of the catalogue (issue 1527)' (#391) from fix/1527-fixture-manifest-name into main

This commit was merged in pull request #391.
This commit is contained in:
2026-10-20 22:15:31 +00:00
2 changed files with 5 additions and 0 deletions
@@ -143,6 +143,11 @@ func TestBuildTwiceGivesOneDigestAndOneExecutable(t *testing.T) {
if out, err := exec.Command("cp", "-r", filepath.Join("testdata", "repos", "build")+"/.", tree).CombinedOutput(); err != nil {
t.Fatalf("%v %s", err, out)
}
// The fixture's manifest is kept as module.json.fixture: a module.json below a module's own directory is taken
// for a module of the catalogue by the readers of a merge (issue 1527), so it is named module.json only here.
if err := os.Rename(filepath.Join(tree, "module.json.fixture"), filepath.Join(tree, "module.json")); err != nil {
t.Fatal(err)
}
home := t.TempDir()
m := &Module{Home: home, Work: work, Cache: t.TempDir()}
m.Run = StepRunner(home)