update documents

This commit is contained in:
Rongsong Shen 2026-08-10 17:51:51 +08:00
parent c705cadadc
commit d70bf6a402
51 changed files with 995 additions and 1997 deletions

View file

@ -48,10 +48,12 @@ func TestPermissions(t *testing.T) {
- `make test-backend` — CGO-backed backend tests (requires nix dev shell + build dir)
- `make test-integration` — full regression suite (requires `XCE_BIN` and `SRV_URL` env vars)
## C Tests (controller / worker / scheduler / lib)
## C Tests (controller / scheduler / lib)
**Location**: `testsuite/` directory inside each C component.
**Note**: `src/worker` has no `testsuite/` directory and no meson `test()` registrations today — it currently carries no C test coverage of its own.
**Structure**: one `.c` test program per unit:
```
@ -83,7 +85,7 @@ extern void reset_ha_state(ha_state_t *s);
- Go: 80% minimum on business logic (controllers, services, store)
- C: every new function in a daemon must have at least one test case in `testsuite/`
- Integration: all public REST endpoints must have at least one integration test case in `regression/`
- Integration: all public REST endpoints must have at least one integration test case in `src/frontend/tests/regression/`
## What Not to Mock