chore: improve CI integration test logs#1049
Conversation
Reduce CI console noise by defaulting console output to 'warn' level while keeping full verbose logs in artifact files. Adds winston as devDependency to replace the placeholder logger, separates console and file log levels, and replaces direct console calls with the LoggerUtil. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughReplaced a placeholder test logger with Winston, added a separate file log level export, changed default console log level to "warn", updated test logger initialization to use the new fileLevel, and replaced direct console calls in wallet precalculation tests with the centralized test logger. Changes
Sequence Diagram(s)(omitted — changes are focused on logger replacement and configuration, not a new multi-component control flow) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@__tests__/integration/helpers/wallet-precalculation.helper.ts`:
- Line 150: Replace the optional chaining uses of loggers.test (e.g.
loggers.test?.log and loggers.test?.error) in wallet-precalculation.helper.ts
with direct access (loggers.test.log and loggers.test.error); update each
occurrence where loggers.test?. is used so it matches other test helpers and
relies on the logger initialized by setupTests-integration.js.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c028e6e6-7fba-4b27-8482-1cc70a401944
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
__tests__/integration/configuration/test.config.ts__tests__/integration/helpers/wallet-precalculation.helper.ts__tests__/integration/utils/logger.util.tspackage.json
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1049 +/- ##
===========================================
+ Coverage 66.30% 87.93% +21.62%
===========================================
Files 114 114
Lines 8910 8910
Branches 2020 2030 +10
===========================================
+ Hits 5908 7835 +1927
+ Misses 2975 1047 -1928
- Partials 27 28 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Aligns with codebase convention used in other helpers (genesis-wallet, wallet-tracker, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@__tests__/integration/helpers/wallet-precalculation.helper.ts`:
- Around line 172-177: The catch block currently logs only a static message and
loses the parse error details; update the catch to pass the caught error (err)
into the logger call so the JSON.parse failure is logged with its error
information (e.g., change the loggers.test!.error call to include err or a
combined message), locating the change around the JSON.parse(strData) try/catch
and the loggers.test!.error invocation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7f18f906-9c7f-467c-b8c6-cf72534a75cb
📒 Files selected for processing (1)
__tests__/integration/helpers/wallet-precalculation.helper.ts
Pass the caught error to the logger so the JSON parse failure details are visible in the log output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: export all types and utils from public API (#1034) * Test: Shared tests for `start` (#1032) * Merge pull request #1046 from HathorNetwork/refact/fee-test-suite refact: move fee test suite to the right folder * test: add new fee template integration tests (#1048) * refact: move fee test suite to the right folder * review changes * refact: keep only moved tests, remove new template tests * test: add new fee template integration tests * fix: native token version defaulting to deposit (#1054) * test: Shared tests for internal wallet methods (#1047) BREAKING CHANGE: HathorWallet.changeServer now returns Promise<void> instead of void, matching the service facade signature. Added changeServer to IHathorWallet. * fix: precalculated wallet address derivation bug (#1056) * feat: single address policy (#1038) * feat: single address policy * chore: improve CI integration test logs (#1049) --------- Co-authored-by: André Abadesso <andre.abadesso@gmail.com> Co-authored-by: Tulio Miranda <tulio.mir@gmail.com> Co-authored-by: André Carneiro <andreluizmrcarneiro@gmail.com>
Summary
warnfor quieter CI output, while keeping file logs atsillyfor complete debugging via artifactswinstonas a devDependency to replace the placeholder logger, enabling actual log level filteringconsole.*calls inwallet-precalculation.helper.tswithLoggerUtilReferences
Acceptance Criteria
warnanderrorlevel logstmp/artifactsSummary by CodeRabbit
Tests
Chores