MCPcopy
hub / github.com/cli/cli / newMockServer

Function newMockServer

internal/codespaces/rpc/invoker_test.go:23–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23func newMockServer() *mockServer {
24 server := &mockServer{}
25
26 server.CodespaceHostServerMock.NotifyCodespaceOfClientActivityFunc = func(context.Context, *codespace.NotifyCodespaceOfClientActivityRequest) (*codespace.NotifyCodespaceOfClientActivityResponse, error) {
27 return &codespace.NotifyCodespaceOfClientActivityResponse{
28 Message: "",
29 Result: true,
30 }, nil
31 }
32
33 return server
34}
35
36// runTestGrpcServer serves grpc requests over the provided Listener using the mockServer for mocked callbacks.
37// It does not return until the Context is cancelled and the server fully shuts down.

Calls

no outgoing calls

Tested by

no test coverage detected