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

Function TestConnectExists_Running

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

Source from the content-addressed store, hash-verified

16)
17
18func TestConnectExists_Running(t *testing.T) {
19 t.Parallel()
20 ctx := testutil.Context(t, testutil.WaitShort)
21
22 var root cli.RootCmd
23 cmd, err := root.Command(root.AGPL())
24 require.NoError(t, err)
25
26 inv := (&serpent.Invocation{
27 Command: cmd,
28 Args: []string{"connect", "exists", "test.example"},
29 }).WithContext(withCoderConnectRunning(ctx))
30 stdout := new(bytes.Buffer)
31 stderr := new(bytes.Buffer)
32 inv.Stdout = stdout
33 inv.Stderr = stderr
34 err = inv.Run()
35 require.NoError(t, err)
36}
37
38func TestConnectExists_NotRunning(t *testing.T) {
39 t.Parallel()

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected