feat(e2e): add Docker-based E2E test infrastructure
This commit is contained in:
27
docker/docker-compose.e2e.yml
Normal file
27
docker/docker-compose.e2e.yml
Normal 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
|
||||
3
docker/fixture-server/Dockerfile
Normal file
3
docker/fixture-server/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM nginx:alpine
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
16
docker/fixture-server/nginx.conf
Normal file
16
docker/fixture-server/nginx.conf
Normal 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 *;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user