-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
🔖 Feature description
Currently, several core controller files in the controllers/controller and controllers/worker directories do not have corresponding unit tests. Adding unit tests for these components will improve maintainability, detect regressions early, and increase overall test coverage for critical reconciliation logic.
🎤 Pitch
In my use-case, improving test coverage for these controllers will:
- Ensure that reconciliation logic behaves correctly across different scenarios.
- Catch bugs earlier in the development lifecycle.
- Increase confidence when making code changes or refactoring.
✌️ Solution
I want this feature to:
- Add new _test.go files for missing controller and worker controller implementations.
- Use controller-runtime’s fake.Client to simulate Kubernetes API interactions.
- Follow existing test patterns from other parts of the project to maintain consistency.
🔄️ Alternative
I considered relying only on integration tests, but they lack granular coverage of individual controller logic. Unit tests are faster, more targeted, and help catch issues earlier.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct