Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ Conventions:
- Suite naming: `*_public_test.go` → `{Name}PublicTestSuite`,
`*_test.go` → `{Name}TestSuite`
- Table-driven structure with `validateFunc` callbacks
- One suite method per function under test — all scenarios (success, errors, edge cases) as rows in one table
- Avoid generic file names like `helpers.go` or `utils.go` — name
files after what they contain

Expand Down
6 changes: 6 additions & 0 deletions docs/docs/sidebar/development/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ Unit tests should follow the Go convention of being located in a file named
located in `test/integration/` and use a `//go:build integration` tag. They
build and start a real `osapi` binary, so they require no external setup.

Use `testify/suite` with table-driven patterns and `validateFunc` callbacks.
**One suite method per function under test.** All scenarios for a function
(success, error codes, transport failures, nil responses) belong as rows in a
single table — never split into separate `TestFoo`, `TestFooError`,
`TestFooNilResponse` methods.

### File naming

Avoid generic file names like `helpers.go` or `utils.go`. Name files after what
Expand Down