MCPcopy Index your code
hub / github.com/coder/coder / newSecretTestInvocation

Function newSecretTestInvocation

cli/secret_internal_test.go:111–125  ·  view source on GitHub ↗
(t *testing.T, stdin io.Reader, stderr io.Writer)

Source from the content-addressed store, hash-verified

109}
110
111func newSecretTestInvocation(t *testing.T, stdin io.Reader, stderr io.Writer) *serpent.Invocation {
112 t.Helper()
113
114 flags := pflag.NewFlagSet("test", pflag.ContinueOnError)
115 if stderr == nil {
116 stderr = io.Discard
117 }
118 inv := (&serpent.Invocation{
119 Stdin: stdin,
120 Stderr: stderr,
121 Command: &serpent.Command{},
122 Args: []string{"api-key"},
123 }).WithTestParsedFlags(t, flags)
124 return inv
125}

Callers 2

TestReadInvocationStdinFunction · 0.85

Calls 1

HelperMethod · 0.65

Tested by

no test coverage detected