Skip to content

test: update analytics tests to use the credential manager#3688

Merged
erika-wallace merged 2 commits intofeat/credential-mgr-integrationfrom
ew/update-analytics-tests
May 4, 2026
Merged

test: update analytics tests to use the credential manager#3688
erika-wallace merged 2 commits intofeat/credential-mgr-integrationfrom
ew/update-analytics-tests

Conversation

@erika-wallace
Copy link
Copy Markdown
Contributor

Summary

This PR restores and updates the analytics unit tests that were commented out during the v11 migration to use the credential manager.

PR #3685 already updated BackboardHerokulyticsClient to use APIClient from @heroku-cli/command instead of reading credentials directly from netrc — these tests have been updated to match.

Changes Made

  • Replaced netrc-based credential stubs with stubCredentialManager from the test helpers
  • Removed tests for deleted getters (netrcToken, netrcLogin, user, usingHerokuAPIKey)
  • Updated test structure so the error path test cases are properly isolated
  • Renamed analytics.unit.test.tsbackboard-herokulytics-client.unit.test.ts and moved to test/unit/analytics-telemetry/ for consistency

Type of Change

Breaking Changes (major semver update)

  • Add a ! after your change type to denote a change that breaks current behavior

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Patch Updates (patch semver update)

  • fix: Bug fix
  • deps: Dependency upgrade
  • revert: Revert a previous commit
  • chore: Change that does not affect production code
  • refactor: Refactoring existing code without changing behavior
  • test: Add/update/remove tests

Testing

Notes:

Steps:

  1. Passing CI suffices

Screenshots (if applicable)

Related Issues

GUS work item: W-20867247

@erika-wallace erika-wallace requested a review from a team as a code owner May 4, 2026 19:22
Copy link
Copy Markdown
Contributor

@tlowrimore-heroku tlowrimore-heroku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@erika-wallace erika-wallace merged commit 4fde394 into feat/credential-mgr-integration May 4, 2026
17 checks passed
@erika-wallace erika-wallace deleted the ew/update-analytics-tests branch May 4, 2026 19:44
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.

2 participants