Test the group check's answer without swapping standard output, and wait for a take-in to forget a new module's wait (issue 1299, C2; issue 1851, A5)

This commit is contained in:
2026-10-22 20:19:57 +02:00
parent 7c0e1d223f
commit 420ae3d0e7
4 changed files with 24 additions and 52 deletions
@@ -58,9 +58,10 @@ func TestAMergeAddingAModuleEndsRegisteredFromItsKeyAndAsksNoBuild(t *testing.T)
_, known := inventoryHolds(t, inv, "systemd-resolved")
return known
})
if obs := newModuleObservations(time.Now().Add(time.Hour)); len(obs) != 0 {
t.Fatalf("a registered module is still named waiting: %+v", obs)
}
// The take-in forgets the wait just after the registration it made is seen.
becomes(t, 5*time.Second, "the registered module no longer named waiting", func() bool {
return len(newModuleObservations(time.Now().Add(time.Hour))) == 0
})
requests, err := inv.RequestsNamed(ctx, inventory.BuildRequest{Repository: "novox/mesh-catalog",
Path: "modules/systemd-resolved"}.Name())
if err != nil || len(requests) != 0 {