seedRunningAuto creates an in-progress task already in auto 'running' state, as if a supervisor had just launched it.
(t *testing.T, slug string, pid int)
| 182 | // seedRunningAuto creates an in-progress task already in auto 'running' |
| 183 | // state, as if a supervisor had just launched it. |
| 184 | func seedRunningAuto(t *testing.T, slug string, pid int) { |
| 185 | t.Helper() |
| 186 | db := openFlowDB(t) |
| 187 | now := flowdb.NowISO() |
| 188 | if _, err := db.Exec( |
| 189 | `UPDATE tasks SET status='in-progress', session_id=?, session_started=?, |
| 190 | auto_run_status='running', auto_run_pid=?, auto_run_started=?, updated_at=? |
| 191 | WHERE slug=?`, |
| 192 | fakeSessionID(slug), now, pid, now, now, slug, |
| 193 | ); err != nil { |
| 194 | t.Fatal(err) |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | // TestAutoExecFinalizesCompleted: when the headless session self-completes |
| 199 | // (task ends up 'done' and the runner returns nil), __auto-exec records |
no test coverage detected