kubeslice-controller icon indicating copy to clipboard operation
kubeslice-controller copied to clipboard

tests: add unit tests for core and worker controllers

Open andoriyaprashant opened this issue 4 months ago • 1 comments

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.go
  • serviceexportconfig_controller.go
  • sliceqosconfig_controller.go

Worker Controllers:

  • workersliceconfig_controller.go
  • workerserviceimport_controller.go
  • workerslicegateway_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.

andoriyaprashant avatar Aug 15 '25 22:08 andoriyaprashant

Hey @andoriyaprashant thanks for the PR, can you please attach the coverprofile output here? I am going over your code changes

gourishkb avatar Aug 18 '25 09:08 gourishkb