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

Function testSelectApiMock

pkg/cmd/codespace/select_test.go:96–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94}
95
96func testSelectApiMock() *apiClientMock {
97 testingCodespace := &api.Codespace{
98 Name: CODESPACE_NAME,
99 }
100 return &apiClientMock{
101 GetCodespaceFunc: func(_ context.Context, name string, includeConnection bool) (*api.Codespace, error) {
102 if name == CODESPACE_NAME {
103 return testingCodespace, nil
104 }
105
106 return nil, errors.New("cannot find codespace")
107 },
108 }
109}

Callers 1

TestApp_SelectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected