(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestPendingOperationDisallowsLogs(t *testing.T) { |
| 12 | app := testingLogsApp() |
| 13 | selector := &CodespaceSelector{api: app.apiClient, codespaceName: "disabledCodespace"} |
| 14 | |
| 15 | if err := app.Logs(context.Background(), selector, false); err != nil { |
| 16 | if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" { |
| 17 | t.Errorf("expected pending operation error, but got: %v", err) |
| 18 | } |
| 19 | } else { |
| 20 | t.Error("expected pending operation error, but got nothing") |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func testingLogsApp() *App { |
| 25 | disabledCodespace := &api.Codespace{ |
nothing calls this directly
no test coverage detected