Files
archie/internal/daemon/cycle_test.go
T
sam 3af96fd818
Quality / check (push) Canceled after 26s
deploy / gate (push) Successful in 4m30s
deploy / archied-image (push) Successful in 2m50s
deploy / agent-image (push) Successful in 12s
deploy / dist-zip (push) Skipped
fix(daemon): watch the task intake loop too and name the stalled loop
2026-11-02 00:26:50 +11:00

17 lines
420 B
Go

package daemon
import (
"context"
"testing"
)
// The systemd watchdog beats only while StalestLoop is fresh, so a cycle that
// doesn't stamp it gets archied killed shortly after every start.
func TestCycleMarksPass(t *testing.T) {
d := &Daemon{}
d.Cycle(context.Background())
if loop, at := d.StalestLoop(); loop != "cycle" || at.IsZero() {
t.Fatalf("StalestLoop() = %q, %v; want a cycle pass", loop, at)
}
}