feat: add --skip-host flag to e2e.sh
Skip host interactive tests when only running containers. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
10
test/e2e.sh
10
test/e2e.sh
@@ -39,6 +39,7 @@ fi
|
|||||||
# Mutable state
|
# Mutable state
|
||||||
RUNTIME=""
|
RUNTIME=""
|
||||||
REBUILD=false
|
REBUILD=false
|
||||||
|
SKIP_HOST=false
|
||||||
TARGET_DISTRO=""
|
TARGET_DISTRO=""
|
||||||
|
|
||||||
# Results tracking
|
# Results tracking
|
||||||
@@ -75,6 +76,10 @@ parse_args() {
|
|||||||
REBUILD=true
|
REBUILD=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--skip-host)
|
||||||
|
SKIP_HOST=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--help|-h)
|
--help|-h)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
@@ -99,6 +104,7 @@ Run BATS tests inside containers across Linux distributions.
|
|||||||
Options:
|
Options:
|
||||||
--runtime <docker|podman> Container runtime (auto-detected if omitted)
|
--runtime <docker|podman> Container runtime (auto-detected if omitted)
|
||||||
--rebuild Force image rebuild ignoring cache
|
--rebuild Force image rebuild ignoring cache
|
||||||
|
--skip-host Skip host interactive tests (run containers only)
|
||||||
--help, -h Show this help
|
--help, -h Show this help
|
||||||
|
|
||||||
Distros: ubuntu, debian, fedora, alpine, arch
|
Distros: ubuntu, debian, fedora, alpine, arch
|
||||||
@@ -305,7 +311,9 @@ main() {
|
|||||||
info "Using runtime: ${RUNTIME}"
|
info "Using runtime: ${RUNTIME}"
|
||||||
|
|
||||||
# Run interactive tests on the host first (covers macOS ssh-keygen)
|
# Run interactive tests on the host first (covers macOS ssh-keygen)
|
||||||
if command -v tmux >/dev/null 2>&1; then
|
if [ "$SKIP_HOST" = true ]; then
|
||||||
|
info "Skipping host interactive tests (--skip-host)"
|
||||||
|
elif command -v tmux >/dev/null 2>&1; then
|
||||||
run_distro_entry "host" run_host_interactive
|
run_distro_entry "host" run_host_interactive
|
||||||
else
|
else
|
||||||
info "tmux not found — skipping host interactive tests (install with: brew install tmux)"
|
info "tmux not found — skipping host interactive tests (install with: brew install tmux)"
|
||||||
|
|||||||
Reference in New Issue
Block a user