()
| 166 | } |
| 167 | |
| 168 | func testingPortsApp() *App { |
| 169 | disabledCodespace := &api.Codespace{ |
| 170 | Name: "disabledCodespace", |
| 171 | PendingOperation: true, |
| 172 | PendingOperationDisabledReason: "Some pending operation", |
| 173 | } |
| 174 | apiMock := &apiClientMock{ |
| 175 | GetCodespaceFunc: func(_ context.Context, name string, _ bool) (*api.Codespace, error) { |
| 176 | if name == "disabledCodespace" { |
| 177 | return disabledCodespace, nil |
| 178 | } |
| 179 | return nil, nil |
| 180 | }, |
| 181 | } |
| 182 | |
| 183 | ios, _, _, _ := iostreams.Test() |
| 184 | |
| 185 | return NewApp(ios, nil, apiMock, nil, nil) |
| 186 | } |
no test coverage detected