etherpad-lite/src/tests/backend/specs
John McLear b19ad89eb0
Fix offline/air-gapped Docker boot: stop pnpm self-provisioning the pinned version (#7911) (#7918)
* fix(docker): don't let pnpm self-provision a pinned version on offline boot (#7911)

The official Docker image installs pnpm directly via npm (corepack was dropped
for Node 25+). Standalone pnpm still honours the "packageManager" pin in
package.json: the image's pnpm intentionally lags that pin (pnpm 11.1.x enforces
a minimum-release-age policy the frozen-lockfile build can't satisfy), so pnpm
treats every invocation — including the informational `pnpm --version` probe
Etherpad runs at startup — as a request to download and run the pinned build.
Behind a corporate firewall / in an air-gapped install that download fails:

  [WARN] plugins - Failed to get pnpm version: Error: Command exited with
  code 1: pnpm --version

which is what #7911 reported.

Fix — neutralise the gap instead of closing it (closing it would break the
frozen-lockfile build on 11.1.x):

  - Dockerfile build stage sets `pnpm_config_pm_on_fail=ignore` (the pnpm 11
    successor to managePackageManagerVersions), inherited by the development and
    production runtime stages. pnpm then uses the installed pnpm instead of
    fetching the pinned one. It does not change which pnpm runs the build-time
    install, so the frozen-lockfile build is unaffected.
  - plugins.ts startup probe and the updater's pnpm-on-PATH checks run with the
    same flag, so the fix also covers non-Docker offline installs and the probe
    can never fail-loud.

Add a backend spec that fails CI if the offline guard is dropped while the image
pnpm differs from the package.json pin.

Verified with a standalone (non-corepack) pnpm: a "packageManager" mismatch
makes `pnpm --version` exit 1 by default (tries to fetch the pinned build), and
exit 0 reading the local version with pm_on_fail=ignore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: scope pnpm offline-guard check to the runtime-inherited build stage

Address Qodo review: the regression spec matched ENV pnpm_config_pm_on_fail
anywhere in the Dockerfile, so it would still pass if the guard were removed
from the `build` stage (which the runtime stages inherit) but left in the
throwaway `adminbuild` stage — reintroducing the offline failure. Extract the
`build` stage block and assert the ENV is present there specifically.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 09:31:00 +01:00
..
admin feat(admin): explain env-var substitution in /settings, surface auth errors (#7819) (#7826) 2026-05-25 13:23:10 +01:00
api test(ci): heartbeat + running-test pointer to debug the silent backend-test ELIFECYCLE (#7838) 2026-05-25 13:50:49 +01:00
fixtures feat(export): native DOCX export via html-to-docx (opt-in) (#7568) 2026-05-08 18:33:50 +01:00
anonymizeAuthor.ts feat(gdpr): admin UI for author erasure (follow-up to #7550) (#7667) 2026-05-14 08:11:48 +01:00
anonymizeIp.ts feat(gdpr): IP/privacy audit (PR2 of #6701) (#7547) 2026-05-01 13:47:40 +01:00
apicalls.ts fix: use correct path for connection diagnostics POST (#7475) 2026-04-06 13:31:15 +01:00
authorTokenCookie.ts feat(gdpr): HttpOnly author-token cookie (PR3 of #6701) (#7548) 2026-05-03 05:56:56 +01:00
chat.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
clientvar_rev_consistency.ts fix: capture head revision atomically with atext to prevent mismatched apply (#7480) 2026-04-07 18:30:08 +01:00
colorutils.ts fix(colors): pick WCAG-higher-contrast text for author colors (#7565) 2026-05-03 12:56:30 +08:00
compactPad.ts feat(7642): bin/compactStalePads — staleness-gated bulk compaction (#7708) 2026-05-10 22:41:52 +02:00
contentcollector.ts fix(editor): preserve U+00A0 non-breaking space (#3037) (#7585) 2026-04-23 08:57:30 +01:00
crypto.ts Converted tests to typescript. (#6181) 2024-02-22 18:31:17 +01:00
dockerfilePnpmPin.ts Fix offline/air-gapped Docker boot: stop pnpm self-provisioning the pinned version (#7911) (#7918) 2026-06-09 09:31:00 +01:00
ensureAuthorTokenCookie.ts feat(gdpr): HttpOnly author-token cookie (PR3 of #6701) (#7548) 2026-05-03 05:56:56 +01:00
export.ts feat(export): native DOCX export via html-to-docx (opt-in) (#7568) 2026-05-08 18:33:50 +01:00
export_list.ts fix: preserve ordered list numbering across bullet interruptions in export (#7470) 2026-04-06 11:24:01 +01:00
ExportEtherpad.ts fix(export): /export/etherpad honors the :rev URL segment (#7566) 2026-04-26 10:29:02 +02:00
favicon-test-custom.png favicon: Redo favicon customization 2021-04-20 13:33:55 -04:00
favicon-test-skin.png favicon: Refactor handler and add tests 2021-04-20 13:33:55 -04:00
favicon.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
filterUpdatablePluginNames.ts fix(plugins): updatePlugins.sh actually updates installed plugins (closes #6670) (#7644) 2026-05-02 07:22:25 +01:00
health.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
hooks.ts Converted tests to typescript. (#6181) 2024-02-22 18:31:17 +01:00
i18n.ts fix: sort language dropdown alphabetically by native name (#7477) 2026-04-06 13:28:57 +01:00
import.ts feat(export): native DOCX export via html-to-docx (opt-in) (#7568) 2026-05-08 18:33:50 +01:00
ImportEtherpad.ts fix: very old .etherpad imports could break import due to lack of aut… (#7473) 2026-04-06 13:31:57 +01:00
ipLoggingSetting.ts feat(gdpr): IP/privacy audit (PR2 of #6701) (#7547) 2026-05-01 13:47:40 +01:00
largePaste.ts fix: increase max socket.io message size to 10MB for large pastes (#7474) 2026-04-06 15:12:08 +01:00
LinkInstaller.ts fix: correct readFileSync calls in LinkInstaller to fix plugin installation (#7467) 2026-04-06 11:22:05 +01:00
lowerCasePadIds.ts test(ci): remove the silent-ELIFECYCLE flake investigation scaffolding (#7868) 2026-05-28 16:49:22 +01:00
messages.ts harden: reject USER_CHANGES inserts without an author attribute (#7773) 2026-05-16 17:23:25 +01:00
npmpublish-workflow.ts fix: use atomic git push in plugin npmpublish workflow (#7494) 2026-04-08 12:38:41 +01:00
OIDCAdapter.ts fix(oidc): fix OIDCAdapter broken flows (#7837) 2026-05-25 16:39:21 +02:00
openapi-admin.ts fix(pad): redesign outdated-version notice (#7799) (#7804) 2026-05-18 12:23:40 +01:00
Pad.ts fix(pad): attribute default welcome text to the system author (#7885) (#7887) 2026-06-05 13:44:35 +01:00
padDeletionManager.ts feat(gdpr): pad deletion controls (PR1 of #6701) (#7546) 2026-05-01 13:50:04 +01:00
padInsertAuthorInvariant.ts harden: assorted server-side tightening for 3.0.2 (#7784) 2026-05-17 13:19:41 +01:00
padOptionsLegacyDefaults.ts fix(7686): username 'false' / 'malformed color: false' for legacy settings.json (#7688) 2026-05-07 09:32:17 +01:00
pads-with-spaces.ts Converted tests to typescript. (#6181) 2024-02-22 18:31:17 +01:00
proxyPathRedirect.ts harden: assorted server-side tightening for 3.0.2 (#7784) 2026-05-17 13:19:41 +01:00
pwaManifest.ts feat: support X-Forwarded-Prefix and X-Ingress-Path (#7802) (#7806) 2026-05-18 13:27:59 +01:00
regression-db.ts Converted tests to typescript. (#6181) 2024-02-22 18:31:17 +01:00
run_cmd.ts feat(packaging): add Debian (.deb) build via nfpm with systemd unit (v2) (#7583) 2026-04-27 10:33:30 +01:00
sanitizePluginsForWire.ts fix(clientVars): stop mutating the shared plugin registry during sanitization (#7587) 2026-04-23 10:18:57 +01:00
SecretRotator.ts Converted tests to typescript. (#6181) 2024-02-22 18:31:17 +01:00
sessionIdCookie.ts security: allow integrator sessionID cookie to be HttpOnly (#7045) (#7755) 2026-05-15 19:44:55 +01:00
SessionStore.ts fix: page sessionstorage cleanup to avoid OOM (#7830) (#7831) 2026-05-22 10:56:35 +01:00
settings.json tests: Add tests for settings.json parsing 2021-06-06 14:00:52 -04:00
settings.ts feat(colors): add padOptions.fadeInactiveAuthorColors with toolbar UI (#7554) 2026-05-03 04:01:13 +08:00
settingsModalHeading.ts feat(settings): enable Pad-wide Settings by default; fix misleading modal title (#7679) 2026-05-07 10:01:04 +01:00
setup-trusted-publishers.ts fix: setup-trusted-publishers.sh works with real npm trust CLI (#7491) 2026-04-08 10:56:13 +01:00
socialMeta-unit.ts feat: support X-Forwarded-Prefix and X-Ingress-Path (#7802) (#7806) 2026-05-18 13:27:59 +01:00
socialMeta.ts feat(pad): scrub history in-place on the pad URL (#7659) (#7710) 2026-05-10 16:21:56 +01:00
socketio.ts feat(settings): enable Pad-wide Settings by default; fix misleading modal title (#7679) 2026-05-07 10:01:04 +01:00
specialpages.ts fix(theme-color): dark address bar + no light-flash on dark-OS load (#7606) (#7909) 2026-06-08 21:54:08 +02:00
Stream.ts Converted tests to typescript. (#6181) 2024-02-22 18:31:17 +01:00
timesliderRedirect.ts feat(pad): scrub history in-place on the pad URL (#7659) (#7710) 2026-05-10 16:21:56 +01:00
tokenTransfer.ts harden: assorted server-side tightening for 3.0.2 (#7784) 2026-05-17 13:19:41 +01:00
undo_clear_authorship.ts fix: allow undo of clear authorship colors without disconnect (#7430) 2026-04-19 09:09:03 +01:00
updateActions.ts feat(updater): tier 3 — auto update with grace window (#7607) (#7720) 2026-05-12 20:50:06 +01:00
updater-integration.ts fix(tests): retry rmdir to clear Windows EBUSY flake in updater-integration (#7728) 2026-05-11 19:35:16 +01:00
updater-scheduler-integration.ts feat(updater): tier 3 — auto update with grace window (#7607) (#7720) 2026-05-12 20:50:06 +01:00
updater-window-integration.ts feat(updater): tier 4 — autonomous update in maintenance window (#7607) (#7753) 2026-05-17 13:50:34 +01:00
updateStatus.ts fix(pad): redesign outdated-version notice (#7799) (#7804) 2026-05-18 12:23:40 +01:00
urlBasePath.ts feat: support X-Forwarded-Prefix and X-Ingress-Path (#7802) (#7806) 2026-05-18 13:27:59 +01:00
webaccess.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00