This commit is contained in:
Arnaud 2026-06-15 09:41:55 +04:00
parent 892e2f6963
commit 37d8904d67
No known key found for this signature in database
GPG Key ID: A6C7C781817146FA
3 changed files with 14 additions and 25 deletions

View File

@ -23,4 +23,5 @@ exec /app/build/storage \
--bootstrap-node="$spr" \
--nat-num-peers-to-ask=1 --nat-max-queue-size=1 \
--nat-min-confidence=1.0 --nat-schedule-interval=30s \
--data-dir=/data --log-level=DEBUG
--data-dir=/data --log-level=DEBUG \
${EXTRA_STORAGE_ARGS:-}

View File

@ -14,24 +14,19 @@ import ../../storageclient
import ../composehelper
const
composeFile = currentSourcePath.parentDir / "compose.yml"
nodeApiUrl = "http://127.0.0.1:18080/api/storage/v1"
suiteName = "NAT not reachable"
testName = "node behind NAT is NotReachable and falls back to relay"
services = ["router", "bootstrap", "node"]
detectTimeout = 300_000 # ms
pollInterval = 5_000 # ms
proc announcesCircuitAddr(info: JsonNode): bool =
info{"announceAddresses"}.getElems.anyIt("p2p-circuit" in it.getStr)
asyncchecksuite suiteName:
asyncchecksuite "NAT not reachable":
let
composeFile = composeFile
nodeApiUrl = nodeApiUrl
suiteName = suiteName
testName = testName
services = services
composeFile = currentSourcePath.parentDir / "compose.yml"
nodeApiUrl = "http://127.0.0.1:18080/api/storage/v1"
suiteName = "NAT not reachable"
testName = "node behind NAT is NotReachable and falls back to relay"
services = ["router", "bootstrap", "node"]
startTime = now().format("yyyy-MM-dd'_'HH:mm:ss")
var client: StorageClient

View File

@ -20,11 +20,6 @@ import ../../storageclient
import ../composehelper
const
composeFile = currentSourcePath.parentDir / "compose.yml"
nodeApiUrl = "http://127.0.0.1:18081/api/storage/v1"
suiteName = "NAT reachable"
testName = "node behind NAT with a forwarded port is Reachable"
services = ["router", "bootstrap", "node"]
detectTimeout = 120_000 # ms
pollInterval = 5_000 # ms
@ -32,15 +27,13 @@ proc announcesDirectAddr(info: JsonNode): bool =
## A reachable node announces at least one direct (non-circuit) address.
info{"announceAddresses"}.getElems.anyIt("p2p-circuit" notin it.getStr)
asyncchecksuite suiteName:
# chronos' async setup/teardown cannot reference module-level GC'ed consts
# (strings/seqs), so rebind the ones they use to suite locals.
asyncchecksuite "NAT reachable":
let
composeFile = composeFile
nodeApiUrl = nodeApiUrl
suiteName = suiteName
testName = testName
services = services
composeFile = currentSourcePath.parentDir / "compose.yml"
nodeApiUrl = "http://127.0.0.1:18081/api/storage/v1"
suiteName = "NAT reachable"
testName = "node behind NAT with a forwarded port is Reachable"
services = ["router", "bootstrap", "node"]
startTime = now().format("yyyy-MM-dd'_'HH:mm:ss")
var client: StorageClient