test: increase test coverage for activity package formatters#419
test: increase test coverage for activity package formatters#419
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #419 +/- ##
==========================================
+ Coverage 68.62% 69.18% +0.56%
==========================================
Files 218 218
Lines 18162 18162
==========================================
+ Hits 12464 12566 +102
+ Misses 4538 4434 -104
- Partials 1160 1162 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add tests for all activity log formatting functions including prettifyActivity event type routing, external auth, function execution, trigger, workflow, and datastore toString helpers.
3c7b76c to
57f433f
Compare
mwbrooks
left a comment
There was a problem hiding this comment.
Comments for the kind ones!
| Created: 1686939542000000, | ||
| } | ||
| result := externalAuthMissingSelectedAuthToString(activity) | ||
| assert.Contains(t, result, "Missing mapped token for workflow 'wf_abc'") |
There was a problem hiding this comment.
note: Don't love the hardcoded string here, but matching a partial also didn't feel right in this situation.
There was a problem hiding this comment.
@mwbrooks I think this is a solid check to keep! 📠
The complete log format might be interesting to match if it's templated, but I don't know if this is needed before merge?
zimeg
left a comment
There was a problem hiding this comment.
@mwbrooks Another nice changeset! Thanks for the constant improvements 👾 ✨
These focused function tests remind me of the zig programming language pattern where tests can be inlined after logic? Interesting to think about!
Whenever's right let's merge this 🚢
| Created: 1686939542000000, | ||
| } | ||
| result := externalAuthMissingSelectedAuthToString(activity) | ||
| assert.Contains(t, result, "Missing mapped token for workflow 'wf_abc'") |
There was a problem hiding this comment.
@mwbrooks I think this is a solid check to keep! 📠
The complete log format might be interesting to match if it's templated, but I don't know if this is needed before merge?
Changelog
Summary
This pull request increases the test coverage of
internal/pkg/platform/activity:The tests are separated into 2 PRs to keep things easier to review. While this is +534 lines, there are a lot of
[]string{}slices that expand across multiple lines.Requirements