mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 20:26:33 +00:00
Catches refactor drift across `.sh`, `Makefile` recursive calls, and GitHub workflows. Includes fixes for the 5 bugs the new test surfaced on first run: `make -C ROOT down`/`up` in the network stack refresh helper (missed during the compose-* rename) and four `make compose-deploymode=…` / `compose-deployapps=…` typos in 07/08/09_deploy_*.sh plus three docstring/echo references (missing space after `compose-deploy`, introduced by the deploy → compose-deploy sed-rename).
37 lines
1.5 KiB
Bash
Executable File
37 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Deploy on minimal hardware — disable non-essential services to save resources.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
# shellcheck source=scripts/tests/environment/utils/common.sh
|
|
source "${SCRIPT_DIR}/utils/common.sh"
|
|
# shellcheck source=scripts/tests/environment/utils/cache.sh
|
|
source "${SCRIPT_DIR}/utils/cache.sh"
|
|
|
|
echo "Snapshotting cache counters before the deploy."
|
|
CACHE_BEFORE="$(cache_snapshot)"
|
|
|
|
echo "Deploying dashboard with matomo disabled to verify INFINITO_SERVICES_DISABLED suppresses the shared service in the inventory."
|
|
make compose-deploy mode=reinstall apps="${DASHBOARD_APP}" INFINITO_SERVICES_DISABLED="matomo"
|
|
inspect
|
|
|
|
echo "Actively probing both caches to confirm pull-through works end-to-end."
|
|
probe_caches
|
|
|
|
echo "Probing the DiD inner-build cache path (frontend hijack + apt rewrite)."
|
|
probe_did_inner_build
|
|
|
|
echo "Verifying that BOTH local caches saw real pull-through traffic."
|
|
CACHE_AFTER="$(cache_snapshot)"
|
|
assert_caches_used "${CACHE_BEFORE}" "${CACHE_AFTER}"
|
|
|
|
echo "Trusting the local CA certificate so HTTPS endpoints are reachable from the host."
|
|
make network-trust-ca
|
|
|
|
echo "Verifying the dashboard is reachable (matomo was disabled, not the dashboard itself)."
|
|
assert_http_status 200 "${DASHBOARD_URL}"
|
|
|
|
echo "Verifying matomo is not reachable because it was excluded from the inventory."
|
|
# Expect 000 because curl aborts in TLS before HTTP when the excluded hostname is missing from the certificate SANs.
|
|
assert_http_status 000 "${MATOMO_URL}"
|