feat(e2e): add Docker-based E2E test infrastructure

This commit is contained in:
2025-11-22 15:40:23 +01:00
parent 2b0e7b5976
commit bb8b152b8a
6 changed files with 969 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
version: '3.8'
services:
chrome:
image: browserless/chrome:latest
ports:
- "9222:3000"
environment:
- CONNECTION_TIMEOUT=120000
- MAX_CONCURRENT_SESSIONS=5
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/json/version"]
interval: 10s
timeout: 5s
retries: 3
fixture-server:
build: ./fixture-server
ports:
- "3456:80"
volumes:
- ../resources/iracing-hosted-sessions:/usr/share/nginx/html:ro
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost/01-hosted-racing.html"]
interval: 10s
timeout: 5s
retries: 3

View File

@@ -0,0 +1,3 @@
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80

View File

@@ -0,0 +1,16 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index all-steps.html;
location / {
try_files $uri $uri/ =404;
add_header Access-Control-Allow-Origin *;
}
location ~ \.html$ {
default_type text/html;
add_header Access-Control-Allow-Origin *;
}
}