kubeslice-controller
kubeslice-controller copied to clipboard
tests: add unit tests for core and worker controllers
Description
Fixes #257
This PR adds comprehensive unit tests for the remaining core controllers under controllers/controller/ and worker controllers under controllers/worker/ to improve test coverage, maintainability, and early detection of regressions.
The following controllers are now covered with unit tests:
Core Controllers:
cluster_controller.goserviceexportconfig_controller.gosliceqosconfig_controller.go
Worker Controllers:
workersliceconfig_controller.goworkerserviceimport_controller.goworkerslicegateway_controller.go
Checklist:
- [X] The title of the PR states what changed and the related issues number (used for the release note).
- [X] Does this PR requires documentation updates?
- [X] I've updated documentation as required by this PR.
- [X] I have performed a self-review of my own code.
- [X] I have commented my code, particularly in hard-to-understand areas.
- [X] I have tested it for all user roles.
- [X] I have added all the required unit test cases.
Hey @andoriyaprashant thanks for the PR, can you please attach the coverprofile output here? I am going over your code changes