Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

yuvraj-kolkar17
Copy link

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
Copy link
Author

yuvraj-kolkar17 commented Jul 29, 2025

@narmidm
Copy link
Member

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