You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Test files use external test packages: `package printer_test`, `package requests_test`
98
+
-Component tests use external test packages (`package printer_test`, `package requests_test`, `package work_packages_test`); cmd-layer tests use internal packages (`package workpackage`) because they exercise unexported command handlers and flag variables
99
99
-`TestMain` in `printer_test` initializes shared state (routes, printer) for the package
100
100
- Tests use plain `t.Errorf` — no test framework, no assertions library
101
-
- Tests only exist for `printer`, `requests`, `common`, and `configuration` — no tests on `cmd/` or `resources/`
101
+
- Tests exist for `printer`, `requests`, `common`, `configuration`, `components/resources/work_packages`, and the `cmd/` packages (root, `activity`, `project`, `user`, `workpackage`)
102
+
- Regression tests for command/resource behaviour use `httptest` localhost servers and count mutating requests to assert no-mutation guarantees
102
103
- When adding a new printer function, add a corresponding test in `components/printer/`
103
104
- When adding a new configuration function, add a corresponding test in `components/configuration/`
Copy file name to clipboardExpand all lines: TODO.md
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,6 @@ Issues identified during code review — non-blocking, to address in future iter
6
6
7
7
-[ ]**`op time-entry create --activity` cannot list available activities** — `GET /api/v3/time_entries/activities` returns 404 in some OpenProject instances (version or permission issue). Investigate using the form endpoint `GET /api/v3/time_entries/form` which may include allowed activities in its schema.
8
8
9
-
## Project identifier refactoring
10
-
11
-
-[ ]**`validatedVersionId()` in `cmd/workpackage/list.go` swallows errors** — after `printer.Error(err)` the function continues with a nil `project`/`versions` instead of returning early. Should `return ""` immediately after the error print to avoid fragile control flow.
12
-
13
9
## CLI UX
14
10
15
-
-[ ]**Add `-w` short flag to `activities --work-package`** — `--work-package` has no short option, inconsistent with similar flags elsewhere. Add `-w` or document why it's intentionally omitted.
16
-
17
11
-[ ]**`--format` flag has no short option** — inconsistent with the convention of adding short flags for frequently used ones. Consider `-f` if it doesn't conflict.
0 commit comments