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

Function TestPendingOperationDisallowsListPorts

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

Source from the content-addressed store, hash-verified

88}
89
90func TestPendingOperationDisallowsListPorts(t *testing.T) {
91 app := testingPortsApp()
92 selector := &CodespaceSelector{api: app.apiClient, codespaceName: "disabledCodespace"}
93
94 if err := app.ListPorts(context.Background(), selector, nil); err != nil {
95 if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" {
96 t.Errorf("expected pending operation error, but got: %v", err)
97 }
98 } else {
99 t.Error("expected pending operation error, but got nothing")
100 }
101}
102
103func TestPendingOperationDisallowsUpdatePortVisibility(t *testing.T) {
104 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