(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func TestPendingOperationDisallowsForwardPorts(t *testing.T) { |
| 118 | app := testingPortsApp() |
| 119 | selector := &CodespaceSelector{api: app.apiClient, codespaceName: "disabledCodespace"} |
| 120 | |
| 121 | if err := app.ForwardPorts(context.Background(), selector, nil); err != nil { |
| 122 | if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" { |
| 123 | t.Errorf("expected pending operation error, but got: %v", err) |
| 124 | } |
| 125 | } else { |
| 126 | t.Error("expected pending operation error, but got nothing") |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | func GetMockApi(allowOrgPorts bool) *apiClientMock { |
| 131 | return &apiClientMock{ |
nothing calls this directly
no test coverage detected