Test Matrix
HostShift uses two integration layers because Docker and real VMs catch different failure classes.
Fast Local Gates
Section titled “Fast Local Gates”npm --prefix docs-site cinpm run docs:buildnpm run docs:compose:configmake test-gomake buildmake test-integration-dockermake test-e2e-vmmake release-snapshotThe default Docker and VM commands are dry-run or scaffold validation paths unless their HOSTSHIFT_RUN_* environment variables are set.
Docker Matrix
Section titled “Docker Matrix”Location:
tests/integration/dockerRun dry validation:
make test-integration-dockerRun real Docker matrix:
HOSTSHIFT_RUN_DOCKER_MATRIX=1 make test-integration-dockerThe matrix creates SSH-managed source and target containers and runs HostShift as a real CLI against them.
Covered fixture behavior:
- Docker Compose app fixture
- standalone container metadata
- file-set transfer
- MySQL restore
- PostgreSQL restore
- Redis existing-snapshot restore
- Docker named-volume existing-snapshot restore and checksum parity
- HTTP health check
- Laravel-style database connectivity check
- source immutability marker checks
- cross-distro matrix selection
Useful diagnostics:
hostshift matrix docker --listhostshift matrix docker --list-imageshostshift matrix docker --pair 'ubuntu22->debian12' --jsonmake docker-pull-fixturesHOSTSHIFT_DOCKER_PULL_TIMEOUT_MS=60000 HOSTSHIFT_RUN_DOCKER_MATRIX=1 make test-integration-dockerVM Matrix
Section titled “VM Matrix”Location:
tests/e2e/vmRun dry validation:
make test-e2e-vmRun provider preflight:
HOSTSHIFT_RUN_VM_E2E=1 make test-e2e-vmRun real apply matrix:
make buildHOSTSHIFT_RUN_VM_E2E=1 bash tests/e2e/vm/run-vm-e2e.sh --applyRun one pair:
HOSTSHIFT_RUN_VM_E2E=1 bash tests/e2e/vm/run-vm-e2e.sh --pair 'ubuntu22->debian12' --applyUseful diagnostics:
hostshift matrix vm --listhostshift matrix vm --pair 'ubuntu22->debian12' --jsonThe VM runner uses Lima. It validates package installation, Nginx and Apache activation, a standalone systemd application, reviewed target-only cutover, firewall state, boot persistence, HTTP health, MySQL parity, PostgreSQL parity, and source snapshot immutability against booted VMs.
Current VM Matrix
Section titled “Current VM Matrix”Initial matrix shape:
ubuntu22 -> ubuntu22ubuntu22 -> ubuntu24ubuntu22 -> ubuntu25ubuntu22 -> debian12debian12 -> ubuntu22debian12 -> ubuntu24debian12 -> ubuntu25debian12 -> debian12debian12 -> debian13
GitHub Actions
Section titled “GitHub Actions”CI runs quick hosted gates on every push and pull request.
Scheduled or manually dispatched runs can execute the Docker matrix. The real VM apply gate runs only on an explicitly labeled self-hosted macOS runner:
self-hosted, macOS, hostshift-vmThis prevents public repository workflows from landing heavy VM workloads on the developer machine unless a runner is deliberately started.