mirror of
https://github.com/amir20/dozzle.git
synced 2026-08-07 11:34:43 +00:00
test(e2e): fix dead specs and cover log streaming + auth negatives (#4868)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+51
-3
@@ -1,3 +1,10 @@
|
||||
x-dozzle-healthcheck: &dozzle-healthcheck
|
||||
test: ["CMD", "/dozzle", "healthcheck"]
|
||||
interval: 5s
|
||||
retries: 5
|
||||
start_period: 5s
|
||||
start_interval: 5s
|
||||
|
||||
services:
|
||||
custom_base:
|
||||
container_name: custom_base
|
||||
@@ -10,6 +17,7 @@ services:
|
||||
- DOZZLE_HOSTNAME=custom name
|
||||
ports:
|
||||
- 8080:8080
|
||||
healthcheck: *dozzle-healthcheck
|
||||
build:
|
||||
context: .
|
||||
simple-auth:
|
||||
@@ -20,6 +28,7 @@ services:
|
||||
environment:
|
||||
- DOZZLE_AUTH_PROVIDER=simple
|
||||
- DOZZLE_NO_ANALYTICS=1
|
||||
healthcheck: *dozzle-healthcheck
|
||||
build:
|
||||
context: .
|
||||
dozzle:
|
||||
@@ -33,8 +42,33 @@ services:
|
||||
- DOZZLE_LEVEL=debug
|
||||
ports:
|
||||
- 7070:8080
|
||||
# Deliberately no healthcheck: this container is the subject of the visual
|
||||
# snapshots, and a healthcheck makes a health badge appear in the sidebar
|
||||
# (HostMenu.vue), which shifts the reference images.
|
||||
build:
|
||||
context: .
|
||||
# Dedicated instance + noisy container so log streaming can be asserted without
|
||||
# perturbing the `name=dozzle` filter the other instances rely on.
|
||||
logs-viewer:
|
||||
container_name: logs-viewer
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- DOZZLE_FILTER=name=logspam
|
||||
- DOZZLE_NO_ANALYTICS=1
|
||||
- DOZZLE_HOSTNAME=logs
|
||||
healthcheck: *dozzle-healthcheck
|
||||
build:
|
||||
context: .
|
||||
depends_on:
|
||||
- logspam
|
||||
logspam:
|
||||
container_name: logspam
|
||||
image: alpine:3
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- 'i=0; while true; do i=$$((i+1)); echo "logspam line $$i"; sleep 1; done'
|
||||
remote:
|
||||
container_name: remote
|
||||
environment:
|
||||
@@ -43,6 +77,7 @@ services:
|
||||
- DOZZLE_NO_ANALYTICS=1
|
||||
ports:
|
||||
- 5050:8080
|
||||
healthcheck: *dozzle-healthcheck
|
||||
build:
|
||||
context: .
|
||||
depends_on:
|
||||
@@ -56,6 +91,7 @@ services:
|
||||
- DOZZLE_LEVEL=debug
|
||||
ports:
|
||||
- 8082:8080
|
||||
healthcheck: *dozzle-healthcheck
|
||||
build:
|
||||
context: .
|
||||
depends_on:
|
||||
@@ -85,6 +121,9 @@ services:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
# Dozzle calls /info on connect; without it the host never initializes and
|
||||
# lists zero containers.
|
||||
- INFO=1
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-z", "127.0.0.1", "2375"]
|
||||
interval: 5s
|
||||
@@ -105,6 +144,15 @@ services:
|
||||
- PWTEST_SKIP_TEST_OUTPUT=1
|
||||
- CI=1
|
||||
depends_on:
|
||||
- dozzle
|
||||
- custom_base
|
||||
- remote
|
||||
dozzle:
|
||||
condition: service_started
|
||||
custom_base:
|
||||
condition: service_healthy
|
||||
remote:
|
||||
condition: service_healthy
|
||||
simple-auth:
|
||||
condition: service_healthy
|
||||
dozzle-with-agent:
|
||||
condition: service_healthy
|
||||
logs-viewer:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user