MCPcopy Create free account
hub / github.com/cli/cli / TestPendingOperationDisallowsListPorts

Function TestPendingOperationDisallowsListPorts

pkg/cmd/codespace/ports_test.go:126–137  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

124}
125
126func TestPendingOperationDisallowsListPorts(t *testing.T) {
127 app := testingPortsApp()
128 selector := &CodespaceSelector{api: app.apiClient, codespaceName: "disabledCodespace"}
129
130 if err := app.ListPorts(context.Background(), selector, nil); err != nil {
131 if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" {
132 t.Errorf("expected pending operation error, but got: %v", err)
133 }
134 } else {
135 t.Error("expected pending operation error, but got nothing")
136 }
137}
138
139func TestPendingOperationDisallowsUpdatePortVisibility(t *testing.T) {
140 app := testingPortsApp()

Callers

nothing calls this directly

Calls 4

testingPortsAppFunction · 0.85
ListPortsMethod · 0.65
ErrorfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected