Review of issue 977: keep the plan's own order for its gates, hold a group only for a composed mesh-delivery, keep mark-ready one release, compare with the batch's start, fail a lone cycle (issue 977)

This commit is contained in:
2026-10-17 21:37:37 +02:00
parent aac4bae5a4
commit 07b050790e
14 changed files with 259 additions and 24 deletions
+8 -1
View File
@@ -122,6 +122,13 @@ func everyHeadWaits(t *testing.T) {
// groupStates stubs mesh-delivery's word on one group: its members and their states, which a test changes as the
// members merge.
func groupStates(t *testing.T, head string, states map[string]string) {
t.Helper()
groupStatesFrom(t, head, states, true)
}
// groupStatesFrom is groupStates for a mesh-delivery that does (composed) or does not yet say the group's gate is the
// composed check's: only the first holds the group's batch open for its last member.
func groupStatesFrom(t *testing.T, head string, states map[string]string, composed bool) {
t.Helper()
was := deliveryGroupOf
deliveryGroupOf = func(_ context.Context, _ bool, asked string) ([]groupMember, bool, error) {
@@ -130,7 +137,7 @@ func groupStates(t *testing.T, head string, states map[string]string) {
}
var members []groupMember
for repository, state := range states {
members = append(members, groupMember{Repository: repository, State: state})
members = append(members, groupMember{Repository: repository, State: state, Composed: composed})
}
return members, true, nil
}