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

test: Make import-related tests stable #3548

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

BYK
Copy link
Member

@BYK BYK commented Sep 19, 2024

The integrations not getting enabled when there are missing modules test was relying on certain packages not being installed in the environment and was causing issues when dev requirements was installed. This patch addse a context manager that simulates import errors for certain packages to make the test robust. It also enables the redis-related test by simulating a missing 'redis' package with the same context manager.

The integrations not getting enabled when there are missing modules test was relying on certain packages not being installed in the environment and was causing issues when dev requirements was installed. This patch addse a context manager that simulates import errors for certain packages to make the test robust. It also enables the redis-related test by simulating a missing 'redis' package with the same context manager.
@BYK BYK force-pushed the byk/tests/stable-import-tests branch from ac95b88 to 861e708 Compare September 19, 2024 13:47
@BYK BYK changed the title byk/tests/stable import tests test: Make import-related tests stable Sep 19, 2024
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.48%. Comparing base (26b86a5) to head (7d6d5a7).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3548      +/-   ##
==========================================
- Coverage   84.49%   84.48%   -0.02%     
==========================================
  Files         133      133              
  Lines       13855    13855              
  Branches     2930     2930              
==========================================
- Hits        11707    11705       -2     
  Misses       1423     1423              
- Partials      725      727       +2     

see 2 files with indirect coverage changes

@sentrivana sentrivana added the Trigger: tests using secrets PR code is safe; run CI label Sep 23, 2024
@sentrivana sentrivana merged commit 2a2fab1 into getsentry:master Sep 23, 2024
125 of 127 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Trigger: tests using secrets PR code is safe; run CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants