Skip to content
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

Updated client_test to solve lint error #900

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

AyushSawant18588
Copy link
Contributor

@AyushSawant18588 AyushSawant18588 commented Nov 14, 2024

Describe the change
Latest version of golangci-lint is used in github workflows to check for lint errors. The recent release of golangci-lint introduced additional linting rules, which surfaced a new lint error in client_test.go file. Also linter execinquery is deprecated and linter gomnd is replaced by mnd more info
This PR addresses and resolves that newly reported lint error and removes the deprecated linters.

Describe your solution
PR adds a type assertion to check if the recovered panic value (r) is a string before comparing it to the expected panic message (tt.wantPanic). If r is indeed a string, it verifies that the panic message matches the expected output.If r is not a string, the code now logs a message indicating that the panic value was of an unexpected type.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.86%. Comparing base (774fc9d) to head (4bd8757).
Report is 71 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #900      +/-   ##
==========================================
+ Coverage   98.46%   98.86%   +0.40%     
==========================================
  Files          24       26       +2     
  Lines        1364     1761     +397     
==========================================
+ Hits         1343     1741     +398     
+ Misses         15       14       -1     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@AyushSawant18588
Copy link
Contributor Author

@sashabaranov Can you please look into this? since without this all other PR's checks are failing due to liniting error

Copy link
Owner

@sashabaranov sashabaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

@sashabaranov sashabaranov merged commit b3ece4d into sashabaranov:master Nov 19, 2024
3 checks passed
@sashabaranov
Copy link
Owner

Wow, seems like our linting rules are pretty outdated, created #903

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