You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: TEST_MODE='api' to suppress deprecation throws in API tests
TEST_MODE now accepts:
- 'true' (default for unit/UI/storybook): deprecation logger throws
on call, rate limiter bypass and short-cache behaviors are active.
- 'api' (API end-to-end suite): same test-mode behaviors as 'true'
(rate-limiter bypass, short cache TTLs, etc.) but the deprecation
logger only logs, does not throw. The API suite intentionally
exercises deprecated DDP methods through /v1/method.call/:method.
- unset: production behavior.
Changes:
- apps/meteor/app/lib/server/lib/deprecationWarningLogger.ts: a
shouldThrowOnDeprecation() helper replaces the seven inline
if (process.env.TEST_MODE === 'true') throw blocks. Only 'true'
triggers the throw; 'api' falls through to the warn-only log.
- Every other strict TEST_MODE === 'true' check across the codebase
(rate limiter, livechat schedulers, settings cache, marketplace
isTesting, registerUser, initialData, serverRunning, twilio
integration, authorization service cache, mongo-config, client
queryClient, CachedSettings) becomes
(... === 'true' || ... === 'api') so the test-mode shortcuts
keep firing for the API suite.
- docker-compose-ci.yml: rocketchat + omnichannel-transcript now
accept the value from the shell via TEST_MODE=\${TEST_MODE:-true}.
Default stays 'true' for any job that does not override.
- .github/workflows/ci-test-e2e.yml: the Start containers step sets
TEST_MODE: 'api' when inputs.type == 'api' or 'api-livechat',
otherwise leaves the docker-compose default. Setting the env on
the test step did not work because the container was already
running with the variable undefined.
0 commit comments