From a254ec03dab33cd3a4a1f80e37adeee335967aff Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Fri, 8 May 2020 09:36:28 +0200 Subject: [PATCH] Bump nim-eth and move tests under v1 subfolder (#3) --- tests/all_tests.nim | 10 +++++----- tests/{ => v1}/test_helpers.nim | 0 tests/{ => v1}/test_rpc_waku.nim | 6 +++--- tests/{ => v1}/test_waku_bridge.nim | 4 ++-- tests/{ => v1}/test_waku_config.nim | 2 +- tests/{ => v1}/test_waku_connect.nim | 2 +- tests/{ => v1}/test_waku_mail.nim | 2 +- vendor/nim-eth | 2 +- waku/node/v2/wakunode.nim | 1 - 9 files changed, 14 insertions(+), 15 deletions(-) rename tests/{ => v1}/test_helpers.nim (100%) rename tests/{ => v1}/test_rpc_waku.nim (97%) rename tests/{ => v1}/test_waku_bridge.nim (97%) rename tests/{ => v1}/test_waku_config.nim (98%) rename tests/{ => v1}/test_waku_connect.nim (99%) rename tests/{ => v1}/test_waku_mail.nim (98%) diff --git a/tests/all_tests.nim b/tests/all_tests.nim index ab0542d478..66a3d68f99 100644 --- a/tests/all_tests.nim +++ b/tests/all_tests.nim @@ -1,7 +1,7 @@ import - ./test_waku_connect, - ./test_waku_config, - ./test_waku_bridge, - ./test_waku_mail, - ./test_rpc_waku + ./v1/test_waku_connect, + ./v1/test_waku_config, + ./v1/test_waku_bridge, + ./v1/test_waku_mail, + ./v1/test_rpc_waku \ No newline at end of file diff --git a/tests/test_helpers.nim b/tests/v1/test_helpers.nim similarity index 100% rename from tests/test_helpers.nim rename to tests/v1/test_helpers.nim diff --git a/tests/test_rpc_waku.nim b/tests/v1/test_rpc_waku.nim similarity index 97% rename from tests/test_rpc_waku.nim rename to tests/v1/test_rpc_waku.nim index f2829d79b2..5db3c98ed9 100644 --- a/tests/test_rpc_waku.nim +++ b/tests/v1/test_rpc_waku.nim @@ -1,15 +1,15 @@ import unittest, strformat, options, stew/byteutils, json_rpc/[rpcserver, rpcclient], eth/common as eth_common, eth/[rlp, keys, p2p], - ../waku/protocol/v1/waku_protocol, - ../waku/node/v1/rpc/[hexstrings, rpc_types, waku, key_storage], + ../../waku/protocol/v1/waku_protocol, + ../../waku/node/v1/rpc/[hexstrings, rpc_types, waku, key_storage], ./test_helpers from os import DirSep, ParDir ## Generate client convenience marshalling wrappers from forward declarations ## For testing, ethcallsigs needs to be kept in sync with ../waku/node/v1/rpc/waku -const sigPath = &"{sourceDir}{DirSep}{ParDir}{DirSep}waku{DirSep}node{DirSep}v1{DirSep}rpc{DirSep}wakucallsigs.nim" +const sigPath = &"{sourceDir}{DirSep}{ParDir}{DirSep}{ParDir}{DirSep}waku{DirSep}node{DirSep}v1{DirSep}rpc{DirSep}wakucallsigs.nim" createRpcSigs(RpcSocketClient, sigPath) proc setupNode(capabilities: varargs[ProtocolInfo, `protocolInfo`]): EthereumNode = diff --git a/tests/test_waku_bridge.nim b/tests/v1/test_waku_bridge.nim similarity index 97% rename from tests/test_waku_bridge.nim rename to tests/v1/test_waku_bridge.nim index 53ad2607a8..5b70427b53 100644 --- a/tests/test_waku_bridge.nim +++ b/tests/v1/test_waku_bridge.nim @@ -10,8 +10,8 @@ import sequtils, unittest, tables, chronos, eth/p2p, eth/p2p/peer_pool, eth/p2p/rlpx_protocols/whisper_protocol as whisper, - ../waku/protocol/v1/waku_protocol as waku, - ../waku/protocol/v1/waku_bridge, + ../../waku/protocol/v1/waku_protocol as waku, + ../../waku/protocol/v1/waku_bridge, ./test_helpers let safeTTL = 5'u32 diff --git a/tests/test_waku_config.nim b/tests/v1/test_waku_config.nim similarity index 98% rename from tests/test_waku_config.nim rename to tests/v1/test_waku_config.nim index fe3d2223ae..4ced21e5f2 100644 --- a/tests/test_waku_config.nim +++ b/tests/v1/test_waku_config.nim @@ -9,7 +9,7 @@ import sequtils, options, unittest, times, - ../waku/protocol/v1/waku_protocol + ../../waku/protocol/v1/waku_protocol suite "Waku envelope validation": test "should validate and allow envelope according to config": diff --git a/tests/test_waku_connect.nim b/tests/v1/test_waku_connect.nim similarity index 99% rename from tests/test_waku_connect.nim rename to tests/v1/test_waku_connect.nim index 1e8cce1486..ce88d4cfe2 100644 --- a/tests/test_waku_connect.nim +++ b/tests/v1/test_waku_connect.nim @@ -9,7 +9,7 @@ import sequtils, tables, unittest, chronos, eth/[keys, p2p], eth/p2p/peer_pool, - ../waku/protocol/v1/waku_protocol, + ../../waku/protocol/v1/waku_protocol, ./test_helpers const diff --git a/tests/test_waku_mail.nim b/tests/v1/test_waku_mail.nim similarity index 98% rename from tests/test_waku_mail.nim rename to tests/v1/test_waku_mail.nim index a19df5cd6c..45709d68c4 100644 --- a/tests/test_waku_mail.nim +++ b/tests/v1/test_waku_mail.nim @@ -1,7 +1,7 @@ import unittest, chronos, tables, sequtils, times, eth/[p2p, async_utils], eth/p2p/peer_pool, - ../waku/protocol/v1/[waku_protocol, waku_mail], + ../../waku/protocol/v1/[waku_protocol, waku_mail], ./test_helpers const diff --git a/vendor/nim-eth b/vendor/nim-eth index 205b57fe71..17586c05d7 160000 --- a/vendor/nim-eth +++ b/vendor/nim-eth @@ -1 +1 @@ -Subproject commit 205b57fe718f18d37d7dfa65cec6799c36fc8b7d +Subproject commit 17586c05d7f047484019565d7eaf8ea9d60b2d30 diff --git a/waku/node/v2/wakunode.nim b/waku/node/v2/wakunode.nim index c1883a4d35..7901c2441a 100644 --- a/waku/node/v2/wakunode.nim +++ b/waku/node/v2/wakunode.nim @@ -3,7 +3,6 @@ import chronicles/topics_registry, # TODO: What? Need this for setLoglevel, weird. eth/[keys, p2p, async_utils], eth/common/utils, eth/net/nat, eth/p2p/[discovery, enode, peer_pool, bootnodes, whispernodes], - eth/p2p/rlpx_protocols/[whisper_protocol, waku_protocol, waku_bridge], # TODO remove me ../v1/rpc/[wakusim, key_storage], ../../vendor/nim-libp2p/libp2p/standard_setup,