Kuadrant / Kuadrant/developer-portal-controller
[Epic] Improve test suite — add unit tests for helper functions
- Dominant language
- Go
- Stars
- 2
- Forks
- 12
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 5
Description
## Summary
The developer portal controller currently has solid integration tests (envtest) and E2E tests (Kind cluster), but all ~100 test cases require a running API server. This epic tracks adding lightweight unit tests for pure helper functions that don't need envtest or Kind — faster feedback, easier to debug.
## Motivation
- Every test currently requires envtest or Kind — no fast, isolated tests exist
- Many helper functions are pure (no k8s client, no I/O) and can be tested with simple input/output assertions
- Pure unit tests run in milliseconds vs seconds for envtest, giving faster feedback during development
- Status condition logic and name generation functions are critical paths worth testing in isolation
## Review & Verification
PRs should include:
- How to review the changes (areas of interest, suggested review order)
- Steps to confirm locally: `make test` runs and passes
Contributor guide
Research direction
Start by identifying the pure helper functions in the developer portal controller, especially status condition logic and name generation, that do not require envtest, Kind, a Kubernetes client, or I/O. Add isolated input/output tests for a defined subset, then run `make test` and confirm the suite passes without requiring the full integration environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100