#!/usr/bin/env bash # Created by John A. Hoeven with the ethical assistance of Claude AI # --------------------------------------------------------------------------- # test_minimal.sh # ~/projects/ceos/alpine-installer/tests/test_minimal.sh # Version: v0.0.1 | Status: DEVELOPMENT # Target: Alpine Linux x86-64 (tinkerpad / ThinkPad T480) # --------------------------------------------------------------------------- # Re-runnable test suite for Tier 1 (Minimal). Run after ce-minimal.sh. # Exits with count of failures (0 = all passed). # --------------------------------------------------------------------------- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" SCRIPT_NAME="test_minimal" source "${SCRIPT_DIR}/lib/ce-common.sh" || { echo "ERROR: ce-common.sh not found"; exit 1; } PASS=0 FAIL=0 check() { local desc="${1}" cmd="${2}" if eval "${cmd}" >/dev/null 2>&1; then log_info "PASS: ${desc}" ((PASS++)) else log_warn "FAIL: ${desc}" ((FAIL++)) fi } log_info "=== TEST SUITE: TIER 1 MINIMAL ===" # Shell environment check "starship present" 'command -v starship' check "less present" 'command -v less' check "mandoc installed" 'apk info -e mandoc' # Terminal check "tmux present" 'command -v tmux' check "vim present" 'command -v vim' check "nano present" 'command -v nano' # Files check "ranger present" 'command -v ranger' check "fzf present" 'command -v fzf' check "zoxide present" 'command -v zoxide' check "stow present" 'command -v stow' # VCS and transfer check "git present" 'command -v git' check "rsync present" 'command -v rsync' check "gpg present" 'command -v gpg' # System tools check "btop present" 'command -v btop' check "lsof present" 'command -v lsof' check "dialog present" 'command -v dialog' # Comms check "neomutt present" 'command -v neomutt' check "msmtp present" 'command -v msmtp' check "mbsync present" 'command -v mbsync' check "pass present" 'command -v pass' # Journal check "python3 present" 'command -v python3' check "pipx present" 'command -v pipx' # Web check "lynx present" 'command -v lynx' check "w3m present" 'command -v w3m' # Network services check "avahi-daemon present" 'command -v avahi-daemon' check "dbus-daemon present" 'command -v dbus-daemon' # Recording check "asciinema present" 'command -v asciinema' # Accessibility check "espeak-ng present" 'command -v espeak-ng' log_info "=== RESULTS: ${PASS} passed, ${FAIL} failed ===" [[ "${FAIL}" -eq 0 ]] \ && log_info "All Tier 1 tests passed." \ || log_warn "${FAIL} test(s) failed — review ${LOG_FILE}" exit "${FAIL}"