Assert the three-repository walk takes each first-tier module from its key at its commit (issue 1931)

This commit is contained in:
2026-10-24 04:03:53 +02:00
parent 64fbef7713
commit 443ba6b265
@@ -135,11 +135,10 @@ func TestThreeRepositoriesInOneWindowAreOneWalk(t *testing.T) {
t.Fatalf("the walk does not build %s: %v", r, w.Modules)
}
}
// Each module's ask is recorded at its own repository's commit.
for _, r := range []string{"one", "two", "three"} {
q, found, err := open.inventory.BuildRequestByID(t.Context(), w.Modules[r].Build)
if err != nil || !found || q.Commit != "c-"+r {
t.Fatalf("%s's build was not recorded at its own commit: %+v %v %v", r, q, found, err)
// Each module of the first tier is taken from its key at its own repository's commit (the cut asks no build).
for _, r := range w.Tiers[w.Tier] {
if s := w.Modules[r]; s == nil || !s.Key || s.State != "asked" || s.KeyAt != "c-"+r {
t.Fatalf("%s was not taken from its key at its own commit: %+v", r, s)
}
}
}