MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestJournalWritePositionalContent

Function TestJournalWritePositionalContent

internal/cmd/journal_test.go:88–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86 t.Setenv("XDG_CONFIG_HOME", tmpDir)
87 t.Setenv("XDG_STATE_HOME", tmpDir)
88 t.Setenv("XDG_CACHE_HOME", tmpDir)
89
90 root := newRootCmd()
91 var buf bytes.Buffer
92 root.SetOut(&buf)
93 root.SetErr(&buf)
94 root.SetArgs(append([]string{"journal", "write", "--json", "--base-url", server.URL}, args...))
95
96 err := root.Execute()
97 var resp output.Response
98 if buf.Len() > 0 {
99 _ = json.Unmarshal(buf.Bytes(), &resp)
100 }
101 return resp, err
102}
103

Callers

nothing calls this directly

Calls 2

journalServerFunction · 0.85
runJournalWriteFunction · 0.85

Tested by

no test coverage detected