-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
94 lines (90 loc) · 3.05 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
94 lines (90 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Integration test environment for n8n-unihook
#
# The test script (scripts/run-integration-tests.sh) orchestrates the startup:
#
# 1. Start n8n + n8n-unihook (unihook boots with an empty API key so
# it can serve mock provider API endpoints while n8n credentials are set up).
# 2. Set up n8n owner, create an API key, and create "dud" credentials
# pointing their external API endpoints at n8n-unihook:3000.
# 3. Restart n8n-unihook with the real API key so trigger sync works.
# 4. Run integration tests.
#
# Unihook's built-in provider API mock routes (/repos/:owner/:repo/hooks,
# /rest/webhooks/1.0/webhook, etc.) replace the previously separate nginx
# mock-apis container.
services:
n8n:
image: n8nio/n8n:latest
container_name: n8n-test
user: root
entrypoint: ["/bin/sh", "/scripts/n8n-test-entrypoint.sh"]
ports:
- "6789:6789"
environment:
# Webhook URL configuration
- WEBHOOK_URL=http://n8n:6789
- N8N_HOST=0.0.0.0
- N8N_PORT=6789
- N8N_PROTOCOL=http
# Disable telemetry in tests
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_PERSONALIZATION_ENABLED=false
# Use SQLite for simplicity (no external DB needed)
- DB_TYPE=sqlite
# Skip the onboarding survey
- N8N_SKIP_SETUP_WIZARD=true
# Disable SAML and LDAP SSO
- N8N_SAML_DISABLED=true
- N8N_LDAP_DISABLED=true
volumes:
- n8n_test_data:/home/node/.n8n
- ${ZOOM_NODE_DIR}:/opt/zoom-node-package:ro
- ./scripts/n8n-test-entrypoint.sh:/scripts/n8n-test-entrypoint.sh:ro
networks:
- test-network
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:6789/healthz"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
n8n-unihook:
build: .
container_name: n8n-unihook-test
ports:
- "3000:3000"
environment:
# API key — initially empty so unihook can boot and serve mock provider
# endpoints while n8n is being configured. The test script restarts
# this container with the real key once it's been created.
- N8N_API_KEY=${N8N_API_KEY:-}
- N8N_API_URL=http://n8n:6789
- LISTEN_ADDR=0.0.0.0:3000
- REFRESH_INTERVAL_SECS=5
- RUST_LOG=n8n_slack_unihook=debug
# Webhook secret for inbound GitHub signature verification
- GITHUB_WEBHOOK_SECRET=test-github-webhook-secret-for-integration-tests
# Zoom webhook configuration
- ZOOM_WEBHOOK_SECRET=test-zoom-webhook-secret-for-integration-tests
- ZOOM_ALLOWED_EVENTS=meeting.started,meeting.ended,recording.completed
# SQLite database for webhook secrets & trigger metadata
- DATABASE_PATH=/data/unihook.db
volumes:
- unihook_data:/data
networks:
- test-network
depends_on:
n8n:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 5s
timeout: 3s
retries: 5
start_period: 5s
networks:
test-network:
driver: bridge
volumes:
n8n_test_data:
unihook_data: