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: Improve Sentry Integration tests #421

Merged
merged 10 commits into from
Apr 26, 2021
Merged

Conversation

ueman
Copy link
Collaborator

@ueman ueman commented Apr 19, 2021

📜 Description

This PR improves the tests which make sure that every platform uses the correct integrations.

#skip-changelog

💡 Motivation and Context

#390

💚 How did you test it?

I've written new tests.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

@ueman ueman changed the base branch from main to feature/support-desktop April 19, 2021 09:52
@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2021

Codecov Report

Merging #421 (df2a62a) into main (bb04c3d) will decrease coverage by 0.39%.
The diff coverage is n/a.

❗ Current head df2a62a differs from pull request most recent head f66572f. Consider uploading reports for the commit f66572f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #421      +/-   ##
==========================================
- Coverage   90.02%   89.63%   -0.40%     
==========================================
  Files          54       49       -5     
  Lines        1684     1514     -170     
==========================================
- Hits         1516     1357     -159     
+ Misses        168      157      -11     
Impacted Files Coverage Δ
flutter/lib/src/sentry_flutter.dart
flutter/lib/src/file_system_transport.dart
flutter/lib/src/widgets_binding_observer.dart
.../lib/src/navigation/sentry_navigator_observer.dart

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb04c3d...f66572f. Read the comment docs.

@ueman ueman marked this pull request as ready for review April 19, 2021 10:49
Base automatically changed from feature/support-desktop to main April 20, 2021 08:32
Comment on lines 138 to 140
channel = MethodChannel('sentry_flutter');
options = SentryFlutterOptions()..dsn = fakeDsn;
hub = Hub(options);
Copy link
Contributor

Choose a reason for hiding this comment

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

every other fixture initializes the fields directly, why is it within a ctor and making them late, is there any benefit in Dart?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't initialize Hub in a field because it needs SentryOptions. I think all other properties could be initialized in a field.

@ueman
Copy link
Collaborator Author

ueman commented Apr 26, 2021

I would like to land #413 before this, so I can implement #390 (comment) in this PR.

Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

left a suggestion, other than that, LGTM

@ueman ueman merged commit 7370cb8 into main Apr 26, 2021
@ueman ueman deleted the fix/improve-integration-tests branch April 26, 2021 12:44
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.

3 participants