-
Notifications
You must be signed in to change notification settings - Fork 2
Testing and QA
joshuaaferguson edited this page Nov 15, 2025
·
1 revision
Use this guide with TESTING.md, docs/SECURITY_TESTING.md, and repo-specific CONTRIBUTING guides.
-
Controller (
controller/):go test -v ./... -coverprofile=coverage.outvalidates reconcilers, webhooks, and idle logic. Aim to keep coverage at/above the current total reported bygo tool cover -func. -
API (
api/): Go unit tests around handlers/middleware, plus integration tests hitting fake Kubernetes/Postgres where practical. Sensitive flows (auth, rate limiting, webhook signatures) need explicit regression tests. -
UI (
ui/):npm test -- --coverage --watchAll=false(Vitest/RTL recommended) for components, hooks, and state stores. Snapshot tests acceptable for complex MUI layouts. -
Templates (
streamspace-templates):kubectl apply --dry-run=client+--server-dry-runand lints for YAML conventions. Ensure icons and categories align with catalog metadata. -
Plugins (
streamspace-plugins): Add unit tests when logic grows beyond simple hooks. Manual verification via StreamSpace UI/CLI is required—document results in PRs.
- Install Docker Desktop with Kubernetes, allocate 4+ CPUs / 8GB RAM.
- Enable Kubernetes, install local-path provisioner, and set the default StorageClass.
- Create
streamspacenamespace, apply CRDs (manifests/crds/), and install via Helm with test values. - Use
kubectl get pods -wuntil controller/API/UI/Postgres are running. - Port-forward the UI or use ingress to exercise session workflows and UI features.
- Run
make fmt lint testlocally before pushing. CI enforces formatting, linting, and tests. - Document manual test plans for features touching session lifecycle, security boundaries, or UI workflows (see
REVIEW_SUMMARY.mdtemplate). - For integration features (plugins, repositories), log test evidence in PR descriptions (commands, screenshots, or API responses).
- Use
kubectl logswith-n streamspaceto inspect controller/API pods and watch hibernation events. - Check
controller/controllers/*_test.gofor reference patterns when writing new reconciler tests. - Review
TESTING.mdtroubleshooting section for common setup mistakes (CRDs missing, storage class misconfig, ingress/TLS issues).
Security-focused testing guidance (fuzzing, scanning, penetration testing) is captured in docs/SECURITY_TESTING.md and summarized on Security-and-Compliance.