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

Function testCodeApiMock

pkg/cmd/codespace/code_test.go:106–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106func testCodeApiMock() *apiClientMock {
107 testingCodespace := &api.Codespace{
108 Name: "monalisa-cli-cli-abcdef",
109 WebURL: "https://monalisa-cli-cli-abcdef.github.dev",
110 }
111 disabledCodespace := &api.Codespace{
112 Name: "disabledCodespace",
113 PendingOperation: true,
114 PendingOperationDisabledReason: "Some pending operation",
115 }
116 return &apiClientMock{
117 GetCodespaceFunc: func(_ context.Context, name string, _ bool) (*api.Codespace, error) {
118 if name == "disabledCodespace" {
119 return disabledCodespace, nil
120 }
121 return testingCodespace, nil
122 },
123 }
124}

Callers 2

TestApp_VSCodeFunction · 0.85
testingCodeAppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected