Skip to content

Commit 62a794d

Browse files
authored
test(nuxt): Pin the nuxt-4 e2e MongoDB image to 8.0 (#25557)
The nuxt-4 e2e jobs keep failing because the `mongo:8` container goes unhealthy about 10s after it starts, fixed by pinning the image to `mongo:8.0` and printing the container logs when setup fails so the next failure shows why.
1 parent 60c12e8 commit 62a794d

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎dev-packages/e2e-tests/test-applications/nuxt-4/docker-compose.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ services:
1818
start_period: 10s
1919

2020
mongo:
21-
image: mongo:8
21+
# `mongo:8` floats to the newest 8.x release, which keeps failing its healthcheck on CI.
22+
image: mongo:8.0
2223
restart: always
2324
container_name: e2e-tests-nuxt-4-mongo
2425
ports:

‎dev-packages/e2e-tests/test-applications/nuxt-4/global-setup.mjs‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
77
export default async function globalSetup() {
88
// Start MySQL, MongoDB, and Redis via Docker Compose. `--wait` blocks until the
99
// healthchecks in docker-compose.yml pass, so the app can connect immediately.
10-
execSync('docker compose up -d --wait', {
11-
cwd: __dirname,
12-
stdio: 'inherit',
13-
});
10+
try {
11+
execSync('docker compose up -d --wait', {
12+
cwd: __dirname,
13+
stdio: 'inherit',
14+
});
15+
} catch (error) {
16+
execSync('docker compose logs --tail 50', { cwd: __dirname, stdio: 'inherit' });
17+
throw error;
18+
}
1419
}

0 commit comments

Comments
 (0)