CodeVetter · Repo Unpack · Testing signals
ollama/ollama
Testing is Go-test-first with heavy coverage in server/, model/parsers, model/renderers, middleware, mlxrunner, create, envconfig; testify is the assertion library. integration/ holds end-to-end suites gated on a live server/registry; CI runs go test -count=1 ./... plus a -race job, golangci-lint, patch-apply checks, vitest for the React app, and a benchmark pass.
- CI test.yaml runs `go test -count=1 -bench=. -benchtime=1x ./...` on PRs and a separate `go test -race -count=1 ./...` race job
- CI includes golangci-lint (golangci-lint-action@v9), go_mod_tidy and go_license checks, plus a patches job that verifies llama/server patches apply cleanly under CMake
- The desktop app is tested with `go test -tags updater_live ./app/...` and the React UI via `npm ci && npm test` (vitest) plus npm run build; Storybook config also present (build-storybook script)
- server/ has ~30 *_test.go files including routes_*_test.go per endpoint family, a fuzz test (create_fuzz_test.go), and sched_test.go for scheduler logic
- model/parsers and model/renderers have per-family test files plus reference-test files (nemotron*_reference_test.go) and shared testhelpers_test.go
- integration/ contains end-to-end tests (api_test, concurrency_test, max_queue_test, vision/audio tests, reg_* group files) that require a running server and real model pulls — documented in integration/README.md
- Test isolation uses OLLAMA_MODELS/home overrides: many packages ship test_home_test.go helpers to redirect model storage into temp dirs (inferred)
- template/ has a golden-file style test driven by embedded index.json + per-model .gotmpl/.json pairs (template_test.go)
- api/ tests include types_typescript_test.go which cross-checks Go API types against generated TypeScript (typescriptify dep in go.mod)
- Coverage gaps: Objective-C/macOS glue (app/cmd/app/*.m, discover/gpu_info_darwin.m) and the codex_desktop_autoreview/proxy hot paths have tests but the darwin app lifecycle is largely untestable in CI (build-tagged windows||darwin) (inferred)