Test Overview
Kioku has three test layers:| Layer | Location | Requires Server | Run With |
|---|---|---|---|
| CLI unit tests | apps/cli/crates/*/tests/ | No | cargo test |
| Hivemind integration tests | services/hivemind/tests/ | Yes | cargo test |
| End-to-end (manual) | tests/ | Yes | ./tests/run-tests.sh |
CLI Unit Tests
These test serialization, auth file handling, and API types. No running server needed.Test Coverage
cc-auth (3 tests):- Auth serialization/deserialization
- Default credentials path
- Token expiry detection
- Session types (Session, SessionConfig, CreateSessionRequest)
- Meeting types (Meeting, TranscriptSegment)
- Knowledge types (Document, SearchResult, SearchResponse)
- API request/response types
- Error handling
Hivemind Integration Tests
These test the full API stack. Requires a running Hivemind instance.- Auth flow (signup, login, token refresh)
- Session CRUD
- Knowledge ingestion and search
- Meeting creation and retrieval
- Usage tracking
End-to-End Tests
Full workflow tests using the CLI against a live stack.Writing New Tests
CLI Unit Tests
Add tests inapps/cli/crates/<crate>/tests/:
Integration Tests
Add tests inservices/hivemind/tests/:
Continuous Integration
GitHub Actions runs:build-images.yml— Builds and pushes Docker images on push to masterrunpod-test.yml— Deploys a test pod on RunPod and runs health checks
