Skip to content

Conversation

@michaelmalave
Copy link
Contributor

@michaelmalave michaelmalave commented Feb 6, 2026

Summary

Re-enabled integration and acceptance tests after the oclif/core v4 upgrade.

Type of Change

  • fix: Bug fix or issue (patch semvar update)
  • feat: Introduces a new feature to the codebase (minor semvar update)
  • perf: Performance improvement
  • docs: Documentation only changes
  • tests: Adding missing tests or correcting existing tests
  • chore: Code cleanup tasks, dependency updates, or other changes

Verification

From repo root:

npm run test:acceptance
npm run test:integration

Additional Details

Helpers

  • runCliSubprocess: Central function that runs the built CLI as a synchronous subprocess and returns its stdout, stderr, and exit code for integration tests that need real CLI output.

Acceptance tests

  • smoke.acceptance.test.ts
    • Run the built CLI (bin/run) against app heroku-cli-ci-smoke-test-app and CI account.
    • Commands: access, addons, apps, apps:info, auth:whoami, authorizations, autocomplete, buildpacks:search, certs, ci, ci:config, clients, config, container:login, domains, git:clone, help, local:version, pipelines, pg:backups, redis:credentials, regions, run, sessions, spaces, status, version, webhooks.
    • CLI surface: plugins --core lists expected oclif plugins; commands output is checked against commands-output.ts (every command id/summary present).
  • plugin.acceptance.test.ts
    • For the listed plugin (e.g. @heroku-cli/plugin-applink): find in node_modules, clone repo, checkout version, run npm install and npm test in the clone (skipped on Windows).

Bats

  • run.bats: heroku local:run echo 'it works!' and heroku local:run exit 1; assert exit code and output.
  • start.bats: From fixtures, run heroku local (and variants with -f Procfile.test, release); assert web/worker/test/release output.
  • version.bats: heroku local:version; assert output contains 3.0.

Integration tests

  • access.integration.test.ts: heroku access --app=heroku-cli-ci-smoke-test-app; output includes admin/collaborator and deploy, manage, operate, view.
  • logs.integration.test.ts: heroku logs --app=heroku-cli-ci-smoke-test-app; output looks like logs (e.g. contains a year).
  • run.integration.test.ts: heroku run on the smoke app: basic echo 1 2 3, --no-launcher, command with spaces, with quotes, with -e FOO=bar, and invalid command (“command not found”).
  • run/detached.integration.test.ts: heroku run:detached ... echo 1 2 3; output tells user to run heroku logs ... --dyno.

Related Issue

Closes #W-19122519

Copy link
Contributor

@sbosio sbosio left a comment

Choose a reason for hiding this comment

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

I left a few non-blocking comments but overall it looks good, so I'm approving.

@michaelmalave michaelmalave merged commit a22643d into v11.0.0 Feb 9, 2026
13 checks passed
@michaelmalave michaelmalave deleted the mm/feat/activate-integration-and-acceptance branch February 9, 2026 21:30
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