From 443ba6b265aa0c60a1543eff6372340e2aa33547 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 24 Oct 2026 04:03:53 +0200 Subject: [PATCH] Assert the three-repository walk takes each first-tier module from its key at its commit (issue 1931) --- cmd/mesh-controller/batches_integration_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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) } } }