-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unit tests #34
Unit tests #34
Conversation
@@ -1,8 +1,102 @@ | |||
defmodule ErrorTrackerTest do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have Telemetry in main, can we test that events are emitted too?
I saw some references on how to do it on here: https://github.com/dashbitco/broadway/blob/main/test/broadway_test.exs#L311
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a new test case for telemetry events! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Adds unit tests for:
ErrorTracker
.report/3
resolve/1
unresolve/1
Telemetry
Tests can run either on PostgreSQL or SQLite3. This is determined by the
DB
env var so:DB=postgres mix test
runs the tests on PostgreSQLDB=sqlite mix test
runs the tests on SQLite3The CI has been also updated to run tests on both databases.
I've also unified the configuration under the
config/
folder. And the dev/test migrations underpriv/repo/
.Previously we had some configuration in the root folder and other in
config/
. Regarding the migrations thepriv/repo/
folder is not included when publishing the package but is used in dev/test.