From 1e8e60caed487f77224fc5d703b6f5443fd500a7 Mon Sep 17 00:00:00 2001 From: Alvaro Revuelta Date: Tue, 22 Nov 2022 08:13:51 +0100 Subject: [PATCH] fix(tests): add missing import for tests (#1375) --- tests/v2/test_peer_exchange.nim | 1 + tests/v2/test_peer_manager.nim | 1 + tests/v2/test_waku_filter.nim | 3 ++- tests/v2/test_waku_lightpush.nim | 1 + tests/v2/test_waku_store_client.nim | 3 ++- tests/v2/test_wakunode_filter.nim | 1 + tests/v2/test_wakunode_lightpush.nim | 1 + waku/v2/README.md | 13 ++++++++++++- 8 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tests/v2/test_peer_exchange.nim b/tests/v2/test_peer_exchange.nim index 668f83e72..09fe49faf 100644 --- a/tests/v2/test_peer_exchange.nim +++ b/tests/v2/test_peer_exchange.nim @@ -4,6 +4,7 @@ import std/[sequtils, options], stew/shims/net, testutils/unittests, + chronicles, chronos, libp2p/peerid, libp2p/crypto/crypto, diff --git a/tests/v2/test_peer_manager.nim b/tests/v2/test_peer_manager.nim index 2c7730c17..e72f8af1f 100644 --- a/tests/v2/test_peer_manager.nim +++ b/tests/v2/test_peer_manager.nim @@ -4,6 +4,7 @@ import std/[options, sequtils], stew/shims/net as stewNet, testutils/unittests, + chronicles, json_rpc/rpcserver, json_rpc/rpcclient, eth/keys, diff --git a/tests/v2/test_waku_filter.nim b/tests/v2/test_waku_filter.nim index 9086a61ef..df48584b2 100644 --- a/tests/v2/test_waku_filter.nim +++ b/tests/v2/test_waku_filter.nim @@ -3,7 +3,8 @@ import std/[options, tables], testutils/unittests, - chronos, + chronicles, + chronos, libp2p/crypto/crypto import ../../waku/v2/node/peer_manager/peer_manager, diff --git a/tests/v2/test_waku_lightpush.nim b/tests/v2/test_waku_lightpush.nim index 3ecda1509..ef50f63d8 100644 --- a/tests/v2/test_waku_lightpush.nim +++ b/tests/v2/test_waku_lightpush.nim @@ -2,6 +2,7 @@ import testutils/unittests, + chronicles, chronos, libp2p/crypto/crypto import diff --git a/tests/v2/test_waku_store_client.nim b/tests/v2/test_waku_store_client.nim index 7a0b066c8..48cfa2f58 100644 --- a/tests/v2/test_waku_store_client.nim +++ b/tests/v2/test_waku_store_client.nim @@ -2,7 +2,8 @@ import std/options, - testutils/unittests, + testutils/unittests, + chronicles, chronos, libp2p/crypto/crypto import diff --git a/tests/v2/test_wakunode_filter.nim b/tests/v2/test_wakunode_filter.nim index 48fd9bcde..2576e75a6 100644 --- a/tests/v2/test_wakunode_filter.nim +++ b/tests/v2/test_wakunode_filter.nim @@ -3,6 +3,7 @@ import stew/shims/net as stewNet, testutils/unittests, + chronicles, chronos, libp2p/crypto/crypto import diff --git a/tests/v2/test_wakunode_lightpush.nim b/tests/v2/test_wakunode_lightpush.nim index 1ef9faad1..9cf91d51d 100644 --- a/tests/v2/test_wakunode_lightpush.nim +++ b/tests/v2/test_wakunode_lightpush.nim @@ -3,6 +3,7 @@ import stew/shims/net as stewNet, testutils/unittests, + chronicles, chronos, libp2p/crypto/crypto, libp2p/switch diff --git a/waku/v2/README.md b/waku/v2/README.md index ff6b6ebfe..b42d30ebc 100644 --- a/waku/v2/README.md +++ b/waku/v2/README.md @@ -45,7 +45,7 @@ Setting up a `wakunode2` on the smallest [digital ocean](https://docs.digitaloce make test2 ``` -You can also run a specific test (and alter compile options as you want): +To run a specific test. ```bash # Get a shell with the right environment variables set ./env.sh bash @@ -53,6 +53,17 @@ You can also run a specific test (and alter compile options as you want): nim c -r ./tests/v2/test_waku_filter.nim ``` +You can also alter compile options. For example, if you want a less verbose output you can do the following. For more, refer to the [compiler flags](https://nim-lang.org/docs/nimc.html#compiler-usage) and [chronicles documentation](https://github.com/status-im/nim-chronicles#compile-time-configuration). + +```bash +nim c -r -d:chronicles_log_level=WARN --verbosity=0 --hints=off ./tests/v2/test_waku_filter.nim +``` + +You may also want to change the `outdir` to a folder ignored by git. +```bash +nim c -r -d:chronicles_log_level=WARN --verbosity=0 --hints=off --outdir=build ./tests/v2/test_waku_filter.nim +``` + ### Waku v2 Protocol Example There is a more basic example, more limited in features and configuration than