Port the source-level smoke-test harness from the padkap fork, adapted to
NetShift. Runs the shell/jq/config-generation logic against a real OpenWrt
24.10.6 userland (sing-box, jq, nft) before flashing to a router.
- tests/Dockerfile: alpine downloads official OpenWrt rootfs tarball ->
FROM scratch; opkg installs sing-box curl jq coreutils-base64 bind-dig nftables
- tests/docker-compose.yml: service netshift-test, bind-mounts netshift/files,
NET_ADMIN/NET_RAW/SYS_ADMIN caps, host network
- tests/entrypoint.sh: 10 test groups (deps, syntax, config, helpers, jq,
config-manager, sing-box check, nft, diagnostics, subscription); adapted to
our config options (dns_type/connection_type/proxy_config_type) and helper
API (url_is_ipv6_literal); updater.sh added to syntax checks
- .github/workflows/openwrt-smoke-tests.yml: standalone CI on push/PR
- build.yml: smoke-tests job gates the release build (needs: smoke-tests)
- .dockerignore + .gitignore (tests/test-results/)
Verified locally: docker compose run netshift-test all -> 44 passed / 0 failed.