Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
842 B
Nim
Raw Normal View History

2026-04-10 18:28:37 +04:00
import std/json
import std/options
import pkg/chronos
import pkg/questionable/results
import ../multinodes
import ../storageclient
import ../storageconfig
multinodesuite "AutoNAT integration":
let natConfig = NodeConfigs(
clients: StorageConfigs
.init(nodes = 2)
.withNatNumPeersToAsk(1)
.withNatMinConfidence(0.5)
.withNatScheduleInterval(10.seconds)
.withNatMaxQueueSize(1)
2026-04-15 09:17:45 +04:00
# .withLogFile()
# .withLogLevel("DEBUG")
.some
2026-04-10 18:28:37 +04:00
)
# Reminder: multinodesuite setup the first node as bootstrap node
test "node is reachable when using bootstrap node on same network", natConfig:
let node1 = clients()[0]
let node2 = clients()[1]
check eventuallySafe(
2026-04-15 09:17:45 +04:00
(await node2.client.natReachability()).get() == "Reachable",
2026-04-10 18:28:37 +04:00
timeout = 30_000,
pollInterval = 500,
)