This directory contains tools for testing the ORLY deployment script to ensure it works correctly across different environments.
./scripts/test-deploy-local.sh
This script tests the deployment functionality locally without requiring Docker. It validates:
./scripts/test-deploy-docker.sh
This script creates a clean Ubuntu 22.04 container and tests the full deployment process. Requires Docker to be installed and accessible.
If you get permission errors, try:
sudo ./scripts/test-deploy-docker.sh
Or add your user to the docker group:
sudo usermod -aG docker $USER
newgrp docker
scripts/Dockerfile.deploy-testA comprehensive Docker image that:
.dockerignoreOptimizes Docker builds by excluding unnecessary files like:
The tests validate all aspects of the deployment script:
- Go installation detection - Directory creation - Environment file generation - Shell configuration
- Go download URL validation - Build dependency scripts - Web UI build process
- Systemd service creation - Capability setting for port 443 - Binary installation - Security hardening
- Invalid directory detection - Missing file validation - Permission checks - Network accessibility
# Test locally (fastest)
./scripts/test-deploy-local.sh
# View the generated report
cat deployment-test-report.txt
# Test in clean Docker environment
./scripts/test-deploy-docker.sh
# Test with different architectures
docker build --platform linux/arm64 -f scripts/Dockerfile.deploy-test -t orly-deploy-test-arm64 .
docker run --rm orly-deploy-test-arm64
# In your CI pipeline
./scripts/test-deploy-local.sh || exit 1
echo "Deployment script validation passed"
# Add user to docker group
sudo usermod -aG docker $USER
newgrp docker
# Or run with sudo
sudo ./scripts/test-deploy-docker.sh
# Install curl for URL testing
sudo apt install curl
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
The build test may be skipped if:
This is normal for testing environments and doesn't affect deployment validation.
Both test scripts generate detailed reports:
deployment-test-report.txtReports include:
These tests are designed to validate the deployment script before actual deployment:
# 1. Test the deployment script
./scripts/test-deploy-local.sh
# 2. If tests pass, deploy to production
./scripts/deploy.sh
# 3. Configure and start the service
export ORLY_TLS_DOMAINS=relay.example.com
sudo systemctl start orly
The tests ensure that the deployment script will work correctly in production environments.