Update pkg/agent/loop_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Kristjan Kruus 2026-03-24 20:51:37 +02:00 committed by GitHub
parent cc6a026624
commit d6c3593f7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2229,7 +2229,10 @@ func TestProcessHeartbeat_ProceedsAfterTurnClears(t *testing.T) {
// Second call — should proceed (not skip)
resp2, err2 := al.ProcessHeartbeat(context.Background(), "heartbeat prompt", "cli", "direct")
if err2 != nil && resp2 == "HEARTBEAT_OK" {
t.Fatal("ProcessHeartbeat skipped after turn was cleared")
if err2 != nil {
t.Fatalf("second ProcessHeartbeat returned error: %v", err2)
}
if resp2 != "Mock response" {
t.Fatalf("expected heartbeat to proceed and return %q, got %q", "Mock response", resp2)
}
}