Skip to content

test: add acceptance tests for credential manager#316

Merged
erika-wallace merged 14 commits intofeat/credential-mgr-integrationfrom
ew/cred-mgr-fix-acceptance-tests
Mar 31, 2026
Merged

test: add acceptance tests for credential manager#316
erika-wallace merged 14 commits intofeat/credential-mgr-integrationfrom
ew/cred-mgr-fix-acceptance-tests

Conversation

@erika-wallace
Copy link
Copy Markdown
Contributor

Summary

This PR adds cross-platform acceptance test coverage for heroku-credential-manager.

  • Adds acceptance test utilities for credential-manager tests, including fixture constants, acceptance gating, native credential-store cleanup, netrc cleanup, and netrc snapshot/restore.
  • Adds unit tests for acceptance helpers and acceptance tests for netrc-only, native-store-only, and native+netrc fallback behavior.
  • Updates CI and npm scripts so acceptance tests run in dedicated paths while standard test runs exclude acceptance suites.
  • Configures Linux acceptance runners with libsecret-tools and gnome-keyring.

Notes:

  • Linux listAccounts now uses spawnSync because secret-tool search --all emits attribute.account in stderr (not stdout); unit tests were updated accordingly.
  • In acceptance tests, hosts = [] is used to avoid netrc writes and explicitly validate the native-store-only path.

Bug Fixes:

  • Fixes Linux handler account parsing in listAccounts.
  • Sets $ErrorActionPreference = 'Stop' in Windows PowerShell commands to halt execution immediately.
  • Suppresses macOS/Windows command noise from stderr.

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

Steps:

  1. Passing CI suffices

Screenshots (if applicable)

Related Issues

GUS work item: W-21745733

@erika-wallace erika-wallace requested a review from a team as a code owner March 31, 2026 18:02
Copy link
Copy Markdown
Contributor

@k80bowman k80bowman left a comment

Choose a reason for hiding this comment

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

Just a couple of small suggestions. Otherwise this looks amazing! Great work!

Copy link
Copy Markdown
Contributor

@k80bowman k80bowman left a comment

Choose a reason for hiding this comment

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

Thank you for the updates! Looks great.

@erika-wallace erika-wallace merged commit b6b65df into feat/credential-mgr-integration Mar 31, 2026
13 checks passed
@erika-wallace erika-wallace deleted the ew/cred-mgr-fix-acceptance-tests branch March 31, 2026 20:23
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