Skip to content

test: add unit tests for RandStringBytesMask and GetRunID in stringutils #753

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 1 commit into
base: master
Choose a base branch
from

Conversation

Prakhar-Shankar
Copy link

What this PR does / why we need it:

Adds unit tests for RandStringBytesMask and GetRunID functions in pkg/utils/stringutils/string.go.
The tests are table-driven and include edge case validation (e.g., n = 0).
This improves the overall test coverage of utility packages.

Which issue this PR fixes:
Fixes #752

Special notes for your reviewer:

  • Achieves 100% coverage for string.go file.
  • Tests verified locally with:
    go test -cover ./pkg/utils/stringutils
    
    

Checklist:

  • Fixes Add unit tests for pkg/utils folder #752
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests
  • E2E run Required for the changes

@Prakhar-Shankar
Copy link
Author

Hey @uditgaurav, @ksatchit , @ispeakc0de, can you please review the unit test please, thanks <3

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.

Add unit tests for pkg/utils folder
2 participants