diff --git a/cmd/mesh-controller/batches_integration_test.go b/cmd/mesh-controller/batches_integration_test.go index c7cf0841..1034ac65 100644 --- a/cmd/mesh-controller/batches_integration_test.go +++ b/cmd/mesh-controller/batches_integration_test.go @@ -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) } } }