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

Function TestCmdUpdateTaskWorkDir

internal/app/update_test.go:62–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

60}
61
62func TestCmdUpdateTaskWorkDir(t *testing.T) {
63 setupFlowRoot(t)
64 seedTask(t, "ut-wd")
65
66 newDir := filepath.Join(t.TempDir(), "new-spot")
67 if rc := cmdUpdate([]string{"task", "ut-wd", "--work-dir", newDir, "--mkdir"}); rc != 0 {
68 t.Fatalf("rc=%d", rc)
69 }
70 db := openFlowDB(t)
71 task, _ := flowdb.GetTask(db, "ut-wd")
72 if task.WorkDir != newDir {
73 t.Errorf("work_dir = %q, want %q", task.WorkDir, newDir)
74 }
75}
76
77func TestCmdUpdateTaskWorkDirMissingNoMkdir(t *testing.T) {
78 setupFlowRoot(t)

Callers

nothing calls this directly

Calls 5

GetTaskFunction · 0.92
setupFlowRootFunction · 0.85
seedTaskFunction · 0.85
cmdUpdateFunction · 0.85
openFlowDBFunction · 0.85

Tested by

no test coverage detected