Skip to content

chore: rename e2e env vars from CONSOLEAPI_* to CONSOLE_API_* and add missing var check#125

Open
shazron wants to merge 10 commits intoremove-axios-form-datafrom
rename-env-vars
Open

chore: rename e2e env vars from CONSOLEAPI_* to CONSOLE_API_* and add missing var check#125
shazron wants to merge 10 commits intoremove-axios-form-datafrom
rename-env-vars

Conversation

@shazron
Copy link
Copy Markdown
Member

@shazron shazron commented Apr 1, 2026

Summary

  • Renames all CONSOLEAPI_* environment variables to CONSOLE_API_* in e2e/e2e.js, e2e/.env.example, and e2e/README.md
  • Adds a startup check that throws with a clear message listing any missing required env vars (CONSOLE_API_API_KEY, CONSOLE_API_ACCESS_TOKEN, CONSOLE_API_IMS_ORG_ID); CONSOLE_API_ENV is excluded since it defaults to prod
  • This contains e2e "fixes" due to regressions in the Transporter API (re-visit once those bugs are addressed)
  • Tested: npm run e2e passes

Base branch

This PR is based on remove-axios-form-data (#124), not master. It is stacked on top of that branch.

Reconciling when the base branch is merged

Once #124 is merged into master, retarget this PR to master and rebase:

git fetch origin
git checkout rename-env-vars
git rebase origin/master
git push --force-with-lease

Then change the base branch of this PR from remove-axios-form-data to master (via the GitHub UI or gh pr edit <number> --base master). The diff will then show only the changes in this PR.

Test plan

  • Copy e2e/.env.example to e2e/.env, populate with valid values, and run npm run e2e
  • Verify that running with one or more env vars unset prints a clear error listing the missing variables

🤖 Generated with Claude Code

shazron and others added 7 commits April 1, 2026 18:40
… missing var check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… files

- Add jest.globalSetup.js: validates required env vars once before all suites
- Add jest.setup.js: initialises sdkClient and orgId as globals, exposes
  apiKey, accessToken, imsOrgId, env, findSDKCode, expectOkResponse
- Update jest.config.js: wire up globalSetup and new setupFilesAfterEnv,
  restrict testRegex to e2e.js only for now
- Remove duplicated boilerplate (dotenv, env validation, sdk init, orgId
  lookup, findSDKCode) from e2e.js and e2e.credentials.js

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shazron shazron marked this pull request as ready for review April 2, 2026 12:06
@shazron shazron requested a review from dthampy April 3, 2026 14:47
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.

4 participants