mirror of
https://github.com/soulis-1256/assemblrr.git
synced 2026-08-30 01:51:39 +00:00
Move live watchdog smoke out of scripts/, drop the old ad-hoc test scripts, and simplify uninstall + README CLI/optional-stack wording. |
||
|---|---|---|
| .. | ||
| integration | ||
| unit | ||
| helpers.sh | ||
| README.md | ||
| run.sh | ||
Tests
Runtime scripts live in scripts/ (installed with the stack). All tests live here.
Layout
tests/
helpers.sh # assertions, install discovery, qBittorrent helpers
run.sh # entrypoint
unit/
test_compose.sh # lib/compose.sh
test_core.sh # expand_path, safe_source, rm guards
test_vpn_secrets.sh # validate_vpn_secrets
test_compose_config.sh # docker compose config (needs Docker)
integration/
watchdog_stall.sh # live qBittorrent + vpn-watchdog (opt-in)
Quick start
# From repo root
./tests/run.sh # unit tests (no Docker required)
./tests/run.sh compose # docker compose config validation
./tests/run.sh all # unit + compose + shellcheck (if installed)
make test # same as ./tests/run.sh all
Live integration (watchdog)
Mutates a running qBittorrent (sets max_connecs=0, adds a public Ubuntu magnet, runs vpn-watchdog.sh). Always restores settings on exit.
ASSEMBLRR_ALLOW_LIVE_TEST=1 ./tests/run.sh integration
# Or point at a non-default install:
ASSEMBLRR_DIR=~/assemblrr ASSEMBLRR_ALLOW_LIVE_TEST=1 \
./tests/integration/watchdog_stall.sh
Without ASSEMBLRR_ALLOW_LIVE_TEST=1 the script exits with code 2 and does nothing.
Config resolution order:
ASSEMBLRR_DIRASSEMBLRR_CONFIG(path to.assemblrr-config)find_install_directoryfromlib/core.sh$HOME/assemblrr
Notes
- Unit tests use a tiny bash assertion helper (no BATS dependency).
- Compose checks create a temporary fixture with dummy secret files so
docker compose configsucceeds. - Install shellcheck for
./tests/run.sh lint.