Local end-to-end testing scripts for validating the production Docker container before deployment.
./test-docker-quick.sh- Builds image
- Starts container
- Tests health endpoint
- Tests root and favicon
- Leaves container running for manual testing
- ~30 seconds
./test-docker-local.sh- Builds image
- Starts container with proper cleanup
- Tests all endpoints (health, SPA, static assets, API)
- Shows container stats and logs
- Auto-cleanup on exit
- ~60 seconds
- Docker installed and running
jqfor JSON parsing (comprehensive test only)
This application uses GitHub OAuth exclusively for authentication (as of v0.2.0).
The test scripts validate:
- Container builds and starts successfully
- Health endpoint responds
- Static assets load correctly
- Application UI is accessible
Note: API endpoints require OAuth authentication. To test authenticated endpoints:
- Start the application:
docker compose up - Visit http://localhost:5000
- Log in with GitHub OAuth
- Test API endpoints from your authenticated browser session
The E2E test scripts focus on infrastructure validation (Docker, health checks, static assets) rather than authenticated API testing.
- ✅ Docker build succeeds
- ✅ Container starts
- ✅
/healthendpoint returns 200 - ✅ Root
/endpoint returns 200 - ✅
/favicon.icoendpoint check - 📋 Shows recent logs
- ✅ Docker build succeeds
- ✅ Container starts and stays healthy
- ✅
/healthendpoint returns healthy status JSON - ✅ Root
/serves Vue SPA with<div id="app"> - ✅ Static JavaScript assets load (HTTP 200)
- ✅ Favicon handling (200 or 404 acceptable)
⚠️ /api/podsendpoint returns 401 (requires OAuth login)- 📊 Container resource stats (CPU, memory)
- 📋 Full container logs
# Check logs
docker logs action-spec-e2e-test
# Or with quick test
docker logs action-spec-quickCommon causes:
- Flask app not binding to 0.0.0.0:8080
- Gunicorn workers crashing
- Missing environment variables
- Static file serving errors
This indicates the serve_spa() function in app.py has issues:
- Check Flask static folder configuration
- Verify
send_static_file()returns properly - Check for path traversal validation issues
# Find process using port 8080
lsof -i :8080
# Or change port in script
PORT=8081 ./test-docker-quick.shAfter running test-docker-quick.sh, the container stays running:
# Test endpoints manually
curl http://localhost:8080/health
curl http://localhost:8080/
curl http://localhost:8080/api/pods
# View live logs
docker logs -f action-spec-quick
# Shell into container
docker exec -it action-spec-quick /bin/bash
# Stop and remove
docker stop action-spec-quick && docker rm action-spec-quickAdd to .github/workflows/:
- name: Run E2E Docker tests
run: ./test-docker-local.sh- Favicon 404 is acceptable (not critical)
- API endpoints return 401 without OAuth authentication (expected behavior)
- First build may take 2-3 minutes (subsequent builds are cached)
Both scripts should exit with code 0 and show:
- ✅ All tests passed
- 🎉 Production Docker container is working correctly
Any failures indicate issues that will occur in production deployment.