Commit f3e8a5c
authored
fix(tests): Don't assume release is set (#4879)
### Description
Even though we try to figure out the current release automatically if
it's not provided, it can still end up being `None`. If that's the case,
it won't be attached to logs. The `test_logs_attributes` test assumes
there always is a release, which is incorrect.
I opted for conditionally checking for `sentry.release` in the test
instead of removing the check altogether, even though the test itself is
supposed to test custom user provided attributes. The reason is that
there is no other generic logs test testing `sentry.release`.
#### Issues
Closes #4878
#### Reminders
- Please add tests to validate your changes, and lint your code using
`tox -e linters`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional
commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors:
[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
community](https://discord.gg/Ww9hbqr)1 parent ffc88f5 commit f3e8a5c
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
| 234 | + | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| |||
0 commit comments