fix: revert TUNNEL_LOCAL_SSH_PORT to 2223, fix registry, add incident docs
- wizard.sh + connect.conf: TUNNEL_LOCAL_SSH_PORT back to 2223 (Synology SSH port) - port-registry: renamed x6340 → x4662 (matches QuickConnect ID) - port-registry: added MR2200ac mesh satellite note for x4662 - deployment checklist: added kit-connect section, post-deployment rules, incident log, and complete fleet port registry table - memory: added fleet-router-inventory.md with full fleet state - hub README: updated with current status and locations Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
SPEED_STATE_DIR="$BATS_TMPDIR/busrouter"
|
||||
setup() {
|
||||
load '../../package/kit-busrouter/files/usr/lib/busrouter/speedtest.sh'
|
||||
mkdir -p "$SPEED_STATE_DIR"
|
||||
export SPEED_STATE_DIR
|
||||
}
|
||||
teardown() { rm -rf "$SPEED_STATE_DIR"; }
|
||||
|
||||
@test "speed: CELL_METERED=1 skips cellular, emits 0 0" {
|
||||
export CELL_METERED=1 CELLULAR_IFACE=rmnet_mhi0
|
||||
run speed_test_iface rmnet_mhi0
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "0 0" ]
|
||||
}
|
||||
|
||||
@test "speed: CELL_METERED=0 does not skip cellular (returns non 0 0)" {
|
||||
export CELL_METERED=0 CELLULAR_IFACE=rmnet_mhi0
|
||||
run speed_test_iface rmnet_mhi0
|
||||
[ "$output" != "0 0" ] || [ "$status" -ne 0 ]
|
||||
}
|
||||
|
||||
@test "speed_test_due: no state file -> due (exit 0)" {
|
||||
run speed_test_due eth0
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "speed_test_due: fresh state file -> not due (exit 1)" {
|
||||
date +%s > "$SPEED_STATE_DIR/speed_last_eth0"
|
||||
export SPEED_INTERVAL=3600
|
||||
run speed_test_due eth0
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "speed_test_due: old state file -> due (exit 0)" {
|
||||
echo "0" > "$SPEED_STATE_DIR/speed_last_eth0"
|
||||
export SPEED_INTERVAL=300
|
||||
run speed_test_due eth0
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
Reference in New Issue
Block a user