(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func 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 | |
| 77 | func TestCmdUpdateTaskWorkDirMissingNoMkdir(t *testing.T) { |
| 78 | setupFlowRoot(t) |
nothing calls this directly
no test coverage detected