Kuadrant / Kuadrant/developer-portal-controller

[Epic] Improve test suite — add unit tests for helper functions

Open
#74 0 comments 0 reactions 0 assignees View on GitHub
enhancement maintainers-only
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.