Skip to content

Commit 0f3d94a

Browse files
committed
fix: set TEST_MODE_API on the container-start step
The previous patch set TEST_MODE_API on the `E2E Test API` step, which runs *after* docker compose has already started the rocketchat container — so the env var never reached the Node process. Move the export to the `Start containers` steps (CE + EE) gated on `inputs.type == 'api' || inputs.type == 'api-livechat'` so the var exists in the shell when docker compose substitutes it into the container's environment from `docker-compose-ci.yml`.
1 parent 8539580 commit 0f3d94a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/ci-test-e2e.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ jobs:
175175
176176
- name: Start containers for CE
177177
if: inputs.release == 'ce'
178+
env:
179+
# API tests intentionally invoke deprecated DDP methods through
180+
# /v1/method.call/:method. The deprecation logger throws under
181+
# TEST_MODE, so for api/api-livechat runs we set TEST_MODE_API
182+
# to suppress the throw (it still logs). Forwarded via
183+
# docker-compose-ci.yml -> rocketchat container env.
184+
TEST_MODE_API: ${{ (inputs.type == 'api' || inputs.type == 'api-livechat') && 'true' || '' }}
178185
run: |
179186
# when we are testing CE, we only need to start the rocketchat container
180187
DEBUG_LOG_LEVEL=${DEBUG_LOG_LEVEL:-0} docker compose -f docker-compose-ci.yml up -d rocketchat --wait
@@ -185,6 +192,7 @@ jobs:
185192
ENTERPRISE_LICENSE: ${{ inputs.enterprise-license }}
186193
TRANSPORTER: ${{ inputs.transporter }}
187194
COMPOSE_PROFILES: ${{ inputs.type == 'api' && 'api' || '' }}
195+
TEST_MODE_API: ${{ (inputs.type == 'api' || inputs.type == 'api-livechat') && 'true' || '' }}
188196
run: |
189197
DEBUG_LOG_LEVEL=${DEBUG_LOG_LEVEL:-0} docker compose -f docker-compose-ci.yml up -d --wait
190198

0 commit comments

Comments
 (0)