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

Function TestCmdShowTaskWorkdirAnnotation

internal/app/show_test.go:277–295  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

275}
276
277func TestCmdShowTaskWorkdirAnnotation(t *testing.T) {
278 root, db := showListEditDB(t)
279 wd := filepath.Join(root, "code", "foo")
280 if err := flowdb.UpsertWorkdir(db, wd, "foo-repo", "", "git@github.com:me/foo.git"); err != nil {
281 t.Fatal(err)
282 }
283 insertTask(t, db, "t-annot", "T", "backlog", "medium", wd, nil)
284 out := captureStdout(t, func() {
285 if rc := cmdShow([]string{"task", "t-annot"}); rc != 0 {
286 t.Errorf("rc=%d", rc)
287 }
288 })
289 if !strings.Contains(out, "known: foo-repo") {
290 t.Errorf("expected workdir nickname annotation; out=%q", out)
291 }
292 if !strings.Contains(out, "origin: git@github.com:me/foo.git") {
293 t.Errorf("expected workdir remote annotation; out=%q", out)
294 }
295}
296
297func TestCmdShowTaskWaitingOn(t *testing.T) {
298 root, db := showListEditDB(t)

Callers

nothing calls this directly

Calls 5

UpsertWorkdirFunction · 0.92
showListEditDBFunction · 0.85
captureStdoutFunction · 0.85
cmdShowFunction · 0.85
insertTaskFunction · 0.70

Tested by

no test coverage detected