Repository navigation
test: e2e coverage for bundled plugin loading, certificate and config; stronger rollback/update unit assertions - #857
Open
chetan2002 wants to merge 1 commit into
Open
chetan2002 wants to merge 1 commit into
chetan2002 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
7 of 10 tasks
…t rollback/update side effects - e2e: load every command of every bundled plugin, round-trip certificate generate/fingerprint/verify and config set/get/delete offline with an isolated config file - run e2e on pull requests across Node 20.17.0 (engines minimum), 22.x and 24.x - unit: assert the exact plugins:install/uninstall calls for rollback and update, including declined and accepted confirmation prompts
chetan2002
force-pushed
the
e2e-plugin-load-coverage
branch
from
November 30, 2026 08:00
ae2afd2 to
42ba732
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds tests where coverage was missing:
e2e/load-commands.jsloads each core plugin andrequire()s every command module (18 plugins, 213 command modules, about 2 seconds). The test fails if a bundled plugin is missing or any command module fails to load.certificate generate,fingerprintandverify, and checks the output against Node'scrypto.X509Certificate: subject, key match, validity period and SHA-1 fingerprint. Also checks that invalid PEM input is rejected.config set,getanddeletefor global and--localkeys, using an isolatedAIO_CONFIG_FILE, with telemetry disabled andAIO_*/WSK_*variables from the shell ignored.rollbackandupdate. The tests now assert the exactplugins:uninstall/plugins:installcalls made. New cases cover a declined--confirmprompt and an accepted one.e2e.yml. e2e now also runs on PRs, across Node20.17.0,22.xand24.x.CONTRIBUTING.mdis updated to match.Related Issue
No issue. Follow-up to #856, where
opencould not be updated because its fixed release is ESM-only. No test would have caught a bundled plugin breaking that way on the minimum Node version.Motivation and Context
src/is already 100% and enforced.app init. Nothing checked that the 17 bundled plugins actually load.enginesminimum. Node 20.19 and later, and 22.12 and later, canrequire()ES modules, so a CI job on floating20.xcannot catch an ESM-only dependency. Only a pinned 20.17.0 can.How Has This Been Tested?
npm run e2eon Node 20.17.0, 22.23.4, 24.22.3npm test(Node 22): unit tests, coverage, lintAIO_E2E_LEAK=leakedset in the shellMutation checks. Each mutation was applied, the tests were run, and the code was then restored:
open@10inplugin-app, on Node 20.17.0app:deploy,app:run,app:dev:ERR_REQUIRE_ESM)node-forgeplugin-eventsrollbackignores a declined promptupdateignores a declined promptrollback -iuninstalls every plugin instead of only the selected onesupdatepasses the wrong install argumentCost: the new offline e2e tests take about 16 seconds per Node version. The networked
app inittest now runs three times per PR. If that is too much, the PR trigger can be reverted on its own.Screenshots (if appropriate):
N/A
Types of changes
Test and CI changes only. Runtime code is unchanged.
Checklist: