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

fix: Add better error handling in test utils #944

Merged
merged 3 commits into from
May 30, 2024

Conversation

0xivanov
Copy link
Contributor

Description:
Methods like NewIntegrationTestEnv and CloseIntegrationTestEnv might panic ungracefully in certain circumstances.
This PR adds better error handling by adding asserts when error occures.

Related issue(s):

Fixes #943

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
@0xivanov 0xivanov added the enhancement New feature or request label May 29, 2024
@0xivanov 0xivanov self-assigned this May 29, 2024
Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.86%. Comparing base (ada9950) to head (bc49ff2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #944   +/-   ##
=======================================
  Coverage   72.86%   72.86%           
=======================================
  Files         167      167           
  Lines       23370    23370           
=======================================
  Hits        17028    17028           
  Misses       5638     5638           
  Partials      704      704           

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

gsstoykov
gsstoykov previously approved these changes May 30, 2024
utilities_for_test.go Outdated Show resolved Hide resolved
utilities_for_test.go Outdated Show resolved Hide resolved
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
@0xivanov 0xivanov marked this pull request as ready for review May 30, 2024 09:25
@0xivanov 0xivanov requested review from a team as code owners May 30, 2024 09:25
utilities_for_test.go Outdated Show resolved Hide resolved
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Copy link

sonarcloud bot commented May 30, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@agadzhalov agadzhalov left a comment

Choose a reason for hiding this comment

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

LGTM

@0xivanov 0xivanov merged commit ea7b49a into main May 30, 2024
10 checks passed
@0xivanov 0xivanov deleted the 943-add-better-error-handling-for-test-utils branch May 30, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add better error handling in utilities for test
3 participants