MCPcopy Create free account
hub / github.com/coder/agentapi / setupCommandOutput

Function setupCommandOutput

cmd/server/server_test.go:24–29  ·  view source on GitHub ↗

setupCommandOutput configures a cobra command to use a null writer for output capture.

(t *testing.T, cmd *cobra.Command)

Source from the content-addressed store, hash-verified

22
23// setupCommandOutput configures a cobra command to use a null writer for output capture.
24func setupCommandOutput(t *testing.T, cmd *cobra.Command) {
25 t.Helper()
26
27 cmd.SetOut(&nullWriter{})
28 cmd.SetErr(&nullWriter{})
29}
30
31func TestParseAgentType(t *testing.T) {
32 tests := []struct {

Calls

no outgoing calls

Tested by

no test coverage detected