package host import ( "context" "testing" "time" "github.com/carlosframework/platform/internal/provision" ) func TestPlan9B8MovesPassUsesCapturedClaimFlag(t *testing.T) { for _, enabled := range []bool{false, true} { h := newMoveHarness(t) host := "a.go.example.com" h.record(t, host, provision.MoveRequest("uk", time.Now()), provision.MoveAbort()) h.cfg.claimRecords = enabled if err := movesPass(context.Background(), h.s, h.worker()); err != nil { t.Fatal(err) } rec := h.read(t, host) want := uint64(0) if enabled { want = 1 } if rec.Move != nil || rec.RecordSeq != want { t.Fatalf("claim=%v record=%+v", enabled, rec) } } }