Skip to content

test(telemetry): add comprehensive unit tests for telemetry_cmd.rs (fixes #1254) - #2675

Closed
jlaportebot wants to merge 5 commits into
rtk-ai:developfrom
jlaportebot:fix/issue-1254-telemetry-tests
Closed

test(telemetry): add comprehensive unit tests for telemetry_cmd.rs (fixes #1254)#2675
jlaportebot wants to merge 5 commits into
rtk-ai:developfrom
jlaportebot:fix/issue-1254-telemetry-tests

Conversation

@jlaportebot

Copy link
Copy Markdown

Fixes #1254

Changes

  • Added comprehensive unit tests for (~165 lines) covering all major functions
  • Tests cover with various HTTP responses, headers, and edge cases
  • Tests cover behavior including salt deletion, hash preservation, marker file, history.db cleanup
  • Tests cover consent/enabled string mappings, env override detection, consent date
  • Tests cover config updates and field preservation
  • Tests cover terminal requirement and input validation (y/yes variants)
  • Tests cover decision logic (consent, enabled, env, URL, marker timing)
  • Tests cover early returns for consent=true/false and non-TTY

Testing

  • All 35 new tests in pass
  • All 26 existing telemetry tests in and pass
  • Full test suite passes (2280+ tests)
  • passes
  • passes (zero warnings)
  • CI will run on all targets

AI Disclosure

This PR was created with AI assistance (Hermes Agent).

@jlaportebot
jlaportebot force-pushed the fix/issue-1254-telemetry-tests branch 2 times, most recently from f5256f0 to 45036ab Compare June 28, 2026 12:42
@jlaportebot

Copy link
Copy Markdown
Author

All CI checks pass (CLA check green). PR is mergeable with no conflicts. Awaiting maintainer review/merge (blocked by merge queue policy).

@jlaportebot

Copy link
Copy Markdown
Author

Closing as duplicate of #2880 (same issue #1254). Consolidating work into the newer PR.

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.

Add unit tests for telemetry_cmd.rs (follow-up from #1181)

1 participant