fix: webhook server connection error in cypress (#35471)

* fix: webhook server connection error in cypress

* fix shared volume with cypress
This commit is contained in:
sabril
2026-03-04 21:00:35 +08:00
committed by GitHub
parent a9a3d3f889
commit 014fee5950
2 changed files with 16 additions and 3 deletions
+5 -3
View File
@@ -262,17 +262,19 @@ $(if mme2e_is_token_in_list "webhook-interactions" "$ENABLED_DOCKER_SERVICES"; t
echo '
webhook-interactions:
image: node:${NODE_VERSION_REQUIRED}
command: sh -c "npm install --global --legacy-peer-deps && exec node webhook_serve.js"
command: sh -c "npm init -y > /dev/null && npm install express@5.1.0 axios@1.11.0 client-oauth2@github:larkox/js-client-oauth2#e24e2eb5dfcbbbb3a59d095e831dbe0012b0ac49 && exec node webhook_serve.js"
healthcheck:
test: ["CMD", "curl", "-s", "-o/dev/null", "127.0.0.1:3000"]
interval: 10s
timeout: 15s
retries: 12
working_dir: /cypress
working_dir: /webhook
network_mode: host
restart: on-failure
volumes:
- "../../e2e-tests/cypress/:/cypress:ro"'
- "../../e2e-tests/cypress/webhook_serve.js:/webhook/webhook_serve.js:ro"
- "../../e2e-tests/cypress/utils/:/webhook/utils:ro"
- "../../e2e-tests/cypress/tests/plugins/post_message_as.js:/webhook/tests/plugins/post_message_as.js:ro"'
fi)
$(if mme2e_is_token_in_list "playwright" "$ENABLED_DOCKER_SERVICES"; then
+11
View File
@@ -45,3 +45,14 @@ for MIGRATION in migration_advanced_permissions_phase_2; do
mme2e_log "${MIGRATION}: completed."
done
mme2e_log "Mattermost container is running and healthy"
# Wait for webhook-interactions container if running cypress tests
if [ "$TEST" = "cypress" ]; then
mme2e_log "Checking webhook-interactions container health"
${MME2E_DC_SERVER} logs --no-log-prefix -- webhook-interactions 2>&1 | tail -5
if ! mme2e_wait_service_healthy webhook-interactions 2 10; then
mme2e_log "Webhook interactions container not healthy, retry attempts exhausted. Giving up." >&2
exit 1
fi
mme2e_log "Webhook interactions container is running and healthy"
fi