MCPcopy Index your code
hub / github.com/cli/cli / newMockServer

Function newMockServer

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

Source from the content-addressed store, hash-verified

22}
23
24func newMockServer() *mockServer {
25 server := &mockServer{}
26
27 server.CodespaceHostServerMock.NotifyCodespaceOfClientActivityFunc = func(context.Context, *codespace.NotifyCodespaceOfClientActivityRequest) (*codespace.NotifyCodespaceOfClientActivityResponse, error) {
28 return &codespace.NotifyCodespaceOfClientActivityResponse{
29 Message: "",
30 Result: true,
31 }, nil
32 }
33
34 return server
35}
36
37// runTestGrpcServer serves grpc requests over the provided Listener using the mockServer for mocked callbacks.
38// 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