Files
multica/server/internal/service/autopilot_test.go
Multica Eve ce00e05169 Add canonical PostHog core metrics events (#2302)
* Add canonical PostHog core metrics events

Co-authored-by: multica-agent <github@multica.ai>

* Address analytics review feedback

Co-authored-by: multica-agent <github@multica.ai>

* Tighten analytics review follow-ups

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Devv <devv@Devvs-Mac-mini.local>
Co-authored-by: multica-agent <github@multica.ai>
2026-05-09 13:12:00 +08:00

21 lines
589 B
Go

package service
import "testing"
func TestAutopilotErrorType(t *testing.T) {
cases := map[string]string{
"unknown execution_mode: nope": "configuration",
"issue blocked": "issue_terminal",
"issue cancelled": "issue_terminal",
"enqueue task: no runtime": "dispatch_error",
"task failed": "task_error",
"unexpected": "autopilot_error",
}
for reason, want := range cases {
if got := autopilotErrorType(reason); got != want {
t.Fatalf("autopilotErrorType(%q) = %q, want %q", reason, got, want)
}
}
}