newSocketClient creates a DRPC client connected to the Unix socket at the given path.
(ctx context.Context, t *testing.T, socketPath string)
| 27 | |
| 28 | // newSocketClient creates a DRPC client connected to the Unix socket at the given path. |
| 29 | func newSocketClient(ctx context.Context, t *testing.T, socketPath string) *agentsocket.Client { |
| 30 | t.Helper() |
| 31 | |
| 32 | client, err := agentsocket.NewClient(ctx, agentsocket.WithPath(socketPath)) |
| 33 | t.Cleanup(func() { |
| 34 | _ = client.Close() |
| 35 | }) |
| 36 | require.NoError(t, err) |
| 37 | |
| 38 | return client |
| 39 | } |
| 40 | |
| 41 | func TestDRPCAgentSocketService(t *testing.T) { |
| 42 | t.Parallel() |