mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-07-02 06:19:52 +00:00
* Remove hardcoded ports in tests * Promote getPorts to a public helper in net/net_config.nim * Make 0.0.0.0:0 a default argument for newTestWakuNode
19 lines
482 B
Nim
19 lines
482 B
Nim
{.used.}
|
|
|
|
import std/[strutils, net], testutils/unittests
|
|
import ../testlib/wakucore, ../testlib/wakunode
|
|
|
|
suite "Waku Core - Published Address":
|
|
test "Test IP 0.0.0.0":
|
|
let node = newTestWakuNode(generateSecp256k1Key())
|
|
|
|
check:
|
|
($node.announcedAddresses).contains("127.0.0.1")
|
|
|
|
test "Test custom IP":
|
|
let node =
|
|
newTestWakuNode(generateSecp256k1Key(), parseIpAddress("8.8.8.8"), Port(0))
|
|
|
|
check:
|
|
($node.announcedAddresses).contains("8.8.8.8")
|