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

Function TestCmdAddTaskCollisionAvoidance

internal/app/add_test.go:224–237  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

222}
223
224func TestCmdAddTaskCollisionAvoidance(t *testing.T) {
225 setupFlowRoot(t)
226 for i := 0; i < 3; i++ {
227 if rc := cmdAdd([]string{"task", "Dup Task"}); rc != 0 {
228 t.Fatalf("add task iter %d rc=%d", i, rc)
229 }
230 }
231 db := openFlowDB(t)
232 for _, s := range []string{"dup-task", "dup-task-2", "dup-task-3"} {
233 if _, err := flowdb.GetTask(db, s); err != nil {
234 t.Errorf("slug %q missing: %v", s, err)
235 }
236 }
237}
238
239func TestCmdAddTaskWorkDirMkdir(t *testing.T) {
240 setupFlowRoot(t)

Callers

nothing calls this directly

Calls 4

GetTaskFunction · 0.92
setupFlowRootFunction · 0.85
cmdAddFunction · 0.85
openFlowDBFunction · 0.85

Tested by

no test coverage detected