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

Function TestAlreadyRebuildingCodespace

pkg/cmd/codespace/rebuild_test.go:11–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestAlreadyRebuildingCodespace(t *testing.T) {
12 rebuildingCodespace := &api.Codespace{
13 Name: "rebuildingCodespace",
14 State: api.CodespaceStateRebuilding,
15 }
16 app := testingRebuildApp(*rebuildingCodespace)
17 selector := &CodespaceSelector{api: app.apiClient, codespaceName: "rebuildingCodespace"}
18
19 err := app.Rebuild(context.Background(), selector, false)
20 if err != nil {
21 t.Errorf("rebuilding a codespace that was already rebuilding: %v", err)
22 }
23}
24
25func testingRebuildApp(mockCodespace api.Codespace) *App {
26 apiMock := &apiClientMock{

Callers

nothing calls this directly

Calls 3

testingRebuildAppFunction · 0.85
RebuildMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected