MCPcopy Create free account
hub / github.com/Facets-cloud/flow / insertRunTaskForSlug

Function insertRunTaskForSlug

internal/app/run_test.go:81–92  ·  view source on GitHub ↗
(t *testing.T, db *sql.DB, slug, pbSlug, wd string)

Source from the content-addressed store, hash-verified

79}
80
81func insertRunTaskForSlug(t *testing.T, db *sql.DB, slug, pbSlug, wd string) {
82 t.Helper()
83 now := flowdb.NowISO()
84 _, err := db.Exec(
85 `INSERT INTO tasks (slug, name, status, kind, playbook_slug, priority, work_dir, created_at, updated_at)
86 VALUES (?, ?, 'backlog', 'playbook_run', ?, 'medium', ?, ?, ?)`,
87 slug, slug, pbSlug, wd, now, now,
88 )
89 if err != nil {
90 t.Fatal(err)
91 }
92}
93
94func TestCmdRunPlaybookCreatesRunTask(t *testing.T) {
95 setupFlowRoot(t)

Callers 2

Calls 1

NowISOFunction · 0.92

Tested by

no test coverage detected