E2E Test Troubleshooting¶
Common issues and solutions when running the APX E2E test suite.
Tests Skipped¶
Solution: The E2E tests require the E2E_ENABLED=1 environment variable. Use make test-e2e which sets this automatically, or run:
Docker Not Running¶
Solution: Start Docker Desktop (macOS/Windows) or the Docker daemon (Linux):
k3d Cluster Creation Fails¶
Solutions: - Ensure your user is in the docker group: sudo usermod -aG docker $USER - Log out and back in after adding to docker group - On macOS, ensure Docker Desktop is running
Port 3000 Already in Use¶
Solution: Stop any service using port 3000:
# Find what's using port 3000
lsof -i :3000
# Kill the process
kill -9 <PID>
# Or clean up stale k3d clusters
make clean-e2e
Gitea Deployment Timeout¶
Solutions: 1. Check Docker has enough resources (~2GB RAM minimum) 2. Check Gitea pod logs:
3. Check pod status: 4. On slow systems, the default timeout may be too short — the suite allows up to 5 minutesTests Hang Indefinitely¶
Solution: Always set a timeout:
If a test hangs during Gitea health checks, it's usually a Docker resource issue. Run make clean-e2e and try again.
Stale Clusters from Previous Runs¶
Solution: Clean up leftover resources:
make clean-e2e
# Or manually:
k3d cluster list
k3d cluster delete <cluster-name>
docker ps -a --filter "name=k3d-apx-e2e" --format "{{.ID}}" | xargs docker rm -f
docker volume ls --filter "name=k3d-apx-e2e" --format "{{.Name}}" | xargs docker volume rm
buf Not Found¶
Solution: Install buf:
# macOS
brew install bufbuild/buf/buf
# Linux
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.66.1/buf-Linux-x86_64" -o /tmp/buf
chmod +x /tmp/buf
sudo mv /tmp/buf /usr/local/bin/buf
apx Binary Not Found in Tests¶
The E2E runner builds the apx binary automatically. If this fails:
Debug Mode¶
To keep the k3d cluster and Gitea running after test completion for manual investigation:
The test output will show: - Gitea URL (typically http://localhost:3000) - Admin credentials and API token - Cluster name
Access Gitea in your browser and inspect repositories, PRs, and tags manually. Clean up when done:
macOS-Specific Issues¶
Docker Desktop Resource Limits¶
Docker Desktop on macOS defaults to limited resources. Go to Docker Desktop → Settings → Resources and ensure: - Memory: ≥4GB (2GB minimum for k3d) - CPUs: ≥2
Apple Silicon (M1/M2/M3)¶
The E2E suite works on Apple Silicon. The Gitea Docker image supports linux/arm64. k3d handles architecture translation automatically.
Linux-Specific Issues¶
cgroup v2¶
If using cgroup v2 (default on modern Linux), ensure Docker is configured for it. k3d supports cgroup v2 natively since v5.x.
rootless Docker¶
k3d has limited support for rootless Docker. If tests fail with permission errors, consider using standard Docker with user group access.