Split the unit level from the integration level in cmd, builder, link, catalogue, inventory; cheap fixtures for the archive-entry bound, the registry waits and the catalogue copy (issue 895)
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/novox/mesh-controller/internal/inventory"
|
||||
)
|
||||
@@ -110,31 +109,3 @@ func (s *movesSaid) noUnsaid(t *testing.T, open *stores) {
|
||||
|
||||
// Live, with the store: the moves a merge makes of a plan — the batch it opens, the walk it is cut into, the tier that
|
||||
// is asked — are each said, and a look that changes nothing says nothing (novox/hq ADR 0406 §2).
|
||||
func TestEveryMoveAMergeAndTheCutMakeOfAPlanIsSaid(t *testing.T) {
|
||||
open := windowed(t)
|
||||
everyHeadWaits(t)
|
||||
asksWithPaths(t)
|
||||
heard := sayingEverySave(t)
|
||||
hear(t, open, catalogueMerge("553b7191claude", "app", t0), t0.Add(time.Second))
|
||||
if _, bs := walks(t, open); len(bs) != 1 {
|
||||
t.Fatalf("%d batch(es) opened", len(bs))
|
||||
}
|
||||
heard.noUnsaid(t, open)
|
||||
cutAt(t, open, t0.Add(91*time.Second))
|
||||
if ws, bs := walks(t, open); len(ws) != 1 || len(bs) != 0 {
|
||||
t.Fatalf("%d walk(s), %d batch(es) after the cut", len(ws), len(bs))
|
||||
}
|
||||
heard.noUnsaid(t, open)
|
||||
counted := 0
|
||||
for _, r := range heard.revs {
|
||||
counted += len(r)
|
||||
}
|
||||
cutAt(t, open, t0.Add(92*time.Second))
|
||||
again := 0
|
||||
for _, r := range heard.revs {
|
||||
again += len(r)
|
||||
}
|
||||
if again != counted {
|
||||
t.Errorf("a look that changed nothing said %d more move(s)", again-counted)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user