Skip to content

Comments

test() - add unit tests for cmd-util.go (0% ➝ ~70% coverage).#82

Open
yuvraj-kolkar17 wants to merge 8 commits intokubeslice:masterfrom
yuvraj-kolkar17:test/add-cmd-util-tests-v2
Open

test() - add unit tests for cmd-util.go (0% ➝ ~70% coverage).#82
yuvraj-kolkar17 wants to merge 8 commits intokubeslice:masterfrom
yuvraj-kolkar17:test/add-cmd-util-tests-v2

Conversation

@yuvraj-kolkar17
Copy link

@yuvraj-kolkar17 yuvraj-kolkar17 commented Jul 29, 2025

Description

Added unit tests for pkg/cmd-util.go to increase coverage from 0% to ~70%.
Test cases include:

  • Setting CLI options
  • Validating default and enterprise configurations
  • Checking for invalid profiles and missing controller names

Part of the #46

How Has This Been Tested?

Local Testing :

go test ./pkg -v
go test ./pkg -cover
Before Coverage After Coverage
Before After

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit test cases.

Does this PR introduce a breaking change?


yuvraj-kolkar17 and others added 8 commits July 28, 2025 22:24
Signed-off-by: yuvraj Kolkar <kolkaryuvraj2@gmail.com>
Signed-off-by: yuvraj Kolkar <kolkaryuvraj2@gmail.com>
Signed-off-by: yuvraj Kolkar <kolkaryuvraj2@gmail.com>
Signed-off-by: yuvraj Kolkar <kolkaryuvraj2@gmail.com>
Signed-off-by: yuvraj Kolkar <144676738+yuvraj-kolkar17@users.noreply.github.com>
Signed-off-by: yuvraj Kolkar <144676738+yuvraj-kolkar17@users.noreply.github.com>
Signed-off-by: yuvraj Kolkar <144676738+yuvraj-kolkar17@users.noreply.github.com>
Signed-off-by: yuvraj Kolkar <144676738+yuvraj-kolkar17@users.noreply.github.com>
@yuvraj-kolkar17
Copy link
Author

yuvraj-kolkar17 commented Jul 29, 2025

@narmidm
Copy link
Contributor

narmidm commented Jul 29, 2025

LGTM

@yuvraj-kolkar17 yuvraj-kolkar17 changed the title test() - Added test file for pkg/cmd-util.go to improve coverage to ~70% of file. test() - add unit tests for cmd-util.go (0% ➝ 100% coverage). Jul 31, 2025
@yuvraj-kolkar17 yuvraj-kolkar17 changed the title test() - add unit tests for cmd-util.go (0% ➝ 100% coverage). test() - add unit tests for cmd-util.go (0% ➝ ~70% coverage). Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants