test: add robust Docker build+run test script with multi-arch support

Replaces inline docker:test script with scripts/docker-test.sh that:
- Detects and reports architecture (x86_64/arm64)
- Polls health endpoint with configurable timeout (60s)
- Verifies home page, health/live, health/ready endpoints
- Tests WebSocket endpoint reachability
- Proper cleanup on exit via trap
- Supports --skip-build flag for CI caching

Co-authored-by: ajnart <49837342+ajnart@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]andajnart committed 2026-03-15 15:21:43 +00:00
1 parent 5a5f1062ce
commit a508fd1806
2 files changed
+131 -1

No files matched your search

+2 -1
View File
@@ -18,7 +18,8 @@
"dev": "turbo dev --parallel",
"docker:dev": "docker compose -f ./development/development.docker-compose.yml up",
"docker:build": "docker build -t homarr:test .",
"docker:test": "docker build -t homarr:test . && docker run --rm -d --name homarr-test -p 7575:7575 homarr:test && echo 'Waiting for container to start...' && sleep 15 && (curl -sf http://localhost:7575 > /dev/null && echo '✅ Docker container is running and responding on port 7575' || echo '❌ Docker container failed health check') ; docker logs homarr-test 2>&1 | tail -30 ; docker stop homarr-test",
"docker:test": "bash scripts/docker-test.sh",
"docker:test:skip-build": "bash scripts/docker-test.sh --skip-build",
"format": "turbo format --continue -- --cache --cache-location node_modules/.cache/.prettiercache",
"format:fix": "turbo format --continue -- --write --cache --cache-location node_modules/.cache/.prettiercache",
"lint": "turbo lint --continue -- --cache --cache-location node_modules/.cache/.eslintcache",