Integration tests (tests/): - 9 categories covering config, lifecycle, signals, supervision, cache, writeback, network faults, crash recovery, and CLI - Shell-based harness with mock NAS (network namespace + SFTP), fault injection (tc netem), and power loss simulation - TAP format runner (run-all.sh) with proper SKIP detection Rust unit tests (warpgate/src/): - 110 tests across 14 modules, all passing in 0.01s - Config parsing, defaults validation, RestartTracker logic, RC API response parsing, rclone arg generation, service config generation, CLI output formatting, warmup path logic Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
586 B
Bash
Executable File
22 lines
586 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
source "$SCRIPT_DIR/../harness/helpers.sh"
|
|
|
|
setup_test_env
|
|
trap teardown_test_env EXIT
|
|
|
|
# Use 192.0.2.1 (TEST-NET-1, RFC 5737) which is unreachable.
|
|
# rclone will hang trying to connect, triggering the 30s mount timeout.
|
|
gen_config nas_host=192.0.2.1
|
|
|
|
start_warpgate
|
|
|
|
# The mount timeout is 30s; allow up to 35s for the process to exit
|
|
wait_for_exit "$WARPGATE_PID" 35
|
|
|
|
# Verify the timeout message appeared in the log
|
|
assert_log_contains "Timed out waiting for mount"
|
|
|
|
echo "PASS: $(basename "$0" .sh)"
|