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

Function TestPendingOperationDisallowsCode

pkg/cmd/codespace/code_test.go:88–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func TestPendingOperationDisallowsCode(t *testing.T) {
89 app := testingCodeApp()
90 selector := &CodespaceSelector{api: app.apiClient, codespaceName: "disabledCodespace"}
91
92 if err := app.VSCode(context.Background(), selector, false, false); err != nil {
93 if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" {
94 t.Errorf("expected pending operation error, but got: %v", err)
95 }
96 } else {
97 t.Error("expected pending operation error, but got nothing")
98 }
99}
100
101func testingCodeApp() *App {
102 ios, _, _, _ := iostreams.Test()

Callers

nothing calls this directly

Calls 4

testingCodeAppFunction · 0.85
VSCodeMethod · 0.80
ErrorfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected