mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
scripts/tests/environment/ becomes scripts/tests/workspace/ with one subdirectory per track. base/ prepares the workspace and is a prerequisite; compose/ and swarm/ are independent of each other, so CI can run them as separate jobs with a budget each. 00_orchestrator.sh runs the tracks named by INFINITO_WORKSPACE_TRACKS and aborts on an unknown one. The job count stays at five: cli.meta.ci.dev_runtime matrix assigns exactly one track per distro and flips the split with the run number, so two consecutive runs cover both tracks on every distro without doubling the matrix. The workspace_track input (rotate|compose|swarm) pins it from manual steer through the orchestrator for a targeted re-run. Job names carry the track glyph from utils/symbol_glossary and the image shortened to its last two segments, so quay.io/centos/centos:latest reads as centos:latest. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
54 lines
1.5 KiB
Bash
Executable File
54 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Smoke-test the interactive console REPL end-to-end: prompt format,
|
|
# stateful cd / home / return / `infinito` jump, relative-then-absolute
|
|
# command resolve, and executable-leaf-runs-instead-of-cd. Runs `python
|
|
# -m cli.console` with a scripted stdin and asserts the prompt sequence
|
|
# the REPL produced.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
# shellcheck source=scripts/tests/workspace/utils/common.sh
|
|
source "${SCRIPT_DIR}/../utils/common.sh"
|
|
|
|
cd "${REPO_ROOT}"
|
|
|
|
log_file="$(mktemp -t infinito-console-smoke.XXXXXX)"
|
|
trap 'rm -f "${log_file}"' EXIT
|
|
|
|
printf '%s\n' \
|
|
'ls' \
|
|
'administration' \
|
|
'ls' \
|
|
'infinito meta' \
|
|
'..' \
|
|
'/administration/deploy' \
|
|
'../..' \
|
|
'infinito administration' \
|
|
'../meta' \
|
|
'/' \
|
|
'exit' |
|
|
"${PYTHON}" -m cli.console \
|
|
>"${log_file}" 2>&1 || true # nocheck: shell-or-true -- grandfathered: worked in practice; TODO: sharpen to catch only the exact tolerated error
|
|
|
|
assert_log_contains() {
|
|
local needle="${1}"
|
|
if ! grep -qF -- "${needle}" "${log_file}"; then
|
|
echo "[FAIL] console output missing: ${needle}" >&2
|
|
echo "--- captured console output ---" >&2
|
|
cat "${log_file}" >&2
|
|
exit 1
|
|
fi
|
|
echo "[OK] console output contains: ${needle}"
|
|
}
|
|
|
|
assert_log_contains "infinito> "
|
|
assert_log_contains "infinito administration> "
|
|
assert_log_contains "infinito meta> "
|
|
assert_log_contains "infinito administration deploy> "
|
|
assert_log_contains "🗂️"
|
|
assert_log_contains "⚙️"
|
|
assert_log_contains "administration"
|
|
assert_log_contains "deploy"
|
|
|
|
echo "Console smoke test passed."
|