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

Function TestConnectExists_NotRunning

cli/connect_test.go:38–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestConnectExists_NotRunning(t *testing.T) {
39 t.Parallel()
40 ctx := testutil.Context(t, testutil.WaitShort)
41
42 var root cli.RootCmd
43 cmd, err := root.Command(root.AGPL())
44 require.NoError(t, err)
45
46 inv := (&serpent.Invocation{
47 Command: cmd,
48 Args: []string{"connect", "exists", "test.example"},
49 }).WithContext(withCoderConnectNotRunning(ctx))
50 stdout := new(bytes.Buffer)
51 stderr := new(bytes.Buffer)
52 inv.Stdout = stdout
53 inv.Stderr = stderr
54 err = inv.Run()
55 require.ErrorIs(t, err, cli.ErrSilent)
56}
57
58type fakeResolver struct {
59 shouldReturnSuccess bool

Callers

nothing calls this directly

Calls 6

CommandMethod · 0.95
AGPLMethod · 0.95
ContextFunction · 0.92
WithContextMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected