Files
mesh-sdk/go/views/behind_internal_test.go
T
jschoubben 45ee5a2a88 views: a picture whose answer names no make time is judged by its revision alone
The assigner's first view of the indexer's modules stayed behind from 2026-11-14 15:04 UTC: events said the state was
made 2026-10-29, the answer named no make time, and zero is always before it, so it asked 378 times and took in no
event; every want kept its build of that day (the indexer's own new build was never wanted, so mesh-delivery #219
was never taken in).
2026-11-15 23:38:39 +01:00

22 lines
767 B
Go

package views
import (
"testing"
"time"
)
// TestAPictureWhoseAnswerNamesNoMakeTimeIsJudgedByItsRevision: an owner whose answer names no time its state was made (the
// indexer's modules) left the assigner's picture "behind" for good while events said 2026-10-29; by its revision it is not.
func TestAPictureWhoseAnswerNamesNoMakeTimeIsJudgedByItsRevision(t *testing.T) {
made := time.Date(2026, 10, 29, 8, 38, 50, 0, time.UTC)
f := &Follower{heardCreated: made, heardRev: 210}
f.st.Revision = 210
if why := f.behindLocked(); why != "" {
t.Errorf("a picture at the revision heard, its answer naming no make time, is behind: %s", why)
}
f.heardRev = 211
if why := f.behindLocked(); why == "" {
t.Error("a picture one revision short is not behind")
}
}