(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func 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 | |
| 58 | type fakeResolver struct { |
| 59 | shouldReturnSuccess bool |
nothing calls this directly
no test coverage detected