Skip to content

Add unit tests for pkg/cerrors and pkg/utils/common#795

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/analyze-test-coverage-and-add-tests
Draft

Add unit tests for pkg/cerrors and pkg/utils/common#795
Copilot wants to merge 2 commits intomasterfrom
copilot/analyze-test-coverage-and-add-tests

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 25, 2026

  • Analyze existing test coverage (7 test files across ~250 Go files, ~2.8% coverage)
  • Add tests for pkg/cerrors/ - Error types, IsUserFriendly, GetErrorType, GetRootCauseAndErrorCode (21 error type constants + 12 test functions)
  • Add tests for pkg/utils/common/ - GetStatusMessage, FilterBasedOnPercentage, SubStringExistsInSlice, Contains, GetContainerNames, BuildSidecar, GetSidecarVolumes, HelperFailedError, ValidateRange, GetRandomSequence (9 test functions)
  • Verify all new and existing tests pass (8 packages all green)
  • Fix gofmt -s formatting lint failures in both test files

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ispeakc0de <35224625+ispeakc0de@users.noreply.github.com>
Agent-Logs-Url: https://github.com/litmuschaos/litmus-go/sessions/98e638a0-5297-4af0-8c37-73ab37e5414b
Copilot AI requested a review from ispeakc0de March 25, 2026 10:43
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