logos-messaging-nim/tests/waku_core/test_published_address.nim
Ivan FB 7c692cc313 chore: vendor bump for 0.23.0 (#2274)
* on_chain/group_manager: use .async: (raises:[Exception]).
* bump nim-dnsdisc
* update nim-chronos to the latest state
* chat2.nim: catch any possible exception when stopping
* chat2bridge.nim: make it to compile after vendor bump
* ValidIpAddress (deprecated) -> IpAddress
* vendor/nim-libp2p additional bump
* libwaku: adapt to vendor bump
* testlib/wakunode.nim: adapt to vendor bump (ValidIpAddress -> IpAddress)
* waku_node: avoid throwing any exception from stop*(node: WakuNode)
* test_confutils_envvar.nim: ValidIpAddress -> IpAddress
* test_jsonrpc_store: capture exception
* test_rln*: handling exceptions
* adaptation to make test_rln_* to work properly
* signature enhancement of group_manager methods
2023-12-14 07:16:39 +01:00

27 lines
580 B
Nim

{.used.}
import
stew/shims/net as stewNet,
std/strutils,
testutils/unittests
import
../testlib/wakucore,
../testlib/wakunode
suite "Waku Core - Published Address":
test "Test IP 0.0.0.0":
let
node = newTestWakuNode(generateSecp256k1Key(), parseIpAddress(
"0.0.0.0"),Port(0))
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")