(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func 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 | |
| 101 | func testingCodeApp() *App { |
| 102 | ios, _, _, _ := iostreams.Test() |
nothing calls this directly
no test coverage detected