waku-interop-tests/tests/relay/test_rln.py

248 lines
13 KiB
Python
Raw Normal View History

chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
import math
import random
from time import time
chore: RLN registration support (#16) * chore: parameters and volumes for RLN relay * chore: add startup test for RLN * fix: remove redundant rln_enabled from WakuNode * fix: - and _ magic in rln parameters * fix: key 'eth_testnet_key' -> 'eth_client_private_key' * fix: rln-register_only -> rln-register-only * fix: use extend instead of append for the volumes list * fix: use absolute path for the volumes names - mark volumes shared across containers * fix: remove :z attr from volumes * fix: remove filename from volume path * fix: remove request for ENR * test: plain RLN registration * fix: remove subscribe * fix: remove ENR related params * test: add run_container func to Docker Mananger * fix: remove run_container func from Docker Mananger - no need for exec * fix: pass exec commands instead of specialized docker exec func * fix: exclude RLN arguments from others * fix: separate RLN volumes by implementation * test: registration with nwaku * test: registration over existing credentials * test: add RLN Relay node startup * test: RLN credentials reuse for relay node startup * fix: clean up unnecessary commands * fix: clean up unnecessary commands for non RLN relay too * test: regression by sending one valid message * fix: add forgotten call to get enr_uri * fix: check RLN credentials set properly * fix: parenthesis in eval expression * fix: better check for RLN credentials * fix: update to new flags - gowaku - separate private key for go/nwaku * test: register RLN * fix: RLN credentials check * fix: remove enable rln-relay flag from registration * test: reorder commands to check go-waku registration * fix: restructure if statements for RLN registration * fix: different set of flag for RLN registration and operation * fix: forgotten "eth" in eth-contract-address * fix: remove redundant None from get_env_var call * fix: refactor rln credentials parsing from start function * fix: missed second return value * test: call to parse_rln_credentials * fix: remove redundant self in call to parse_rln_credentials * fix: remove rln related values if not valid * fix: refactored to accept multiple private keys - JSON source for RLN credentials - removed go-waku support for RLN * test: register RLN with 2 nwaku nodes * fix: missing open file, key errors * fix: return effective keystore_path * fix: cleanup unused env variables * fix: cleanup unused env variables from relay * fix: wait longer for credentials file to be written to disk * test: remove waiting for credentials file to be written to disk * fix: add select_private_key() * fix: merge parse_rln_credentials and parse_rln_registration_credentials * test: wait for filesystem cache * test: try with os.sync to flush cache * test: stop container to clear cache * fix: 15 sec wait + stop container to clear cache * test: RLN registration test with fixture and cred file check * test: added allure.step - RLN registration for single node - corresponding test to register all keys * fix: f-strings in the test * fix: sync naming for register_main_rln_relay_nodes * fix: add WARN message to log unset and expected RLN credentials * fix: pytest.skip added to exit tests when non nwaku image is used * fix: swap NODE2 for DEFAULT_NWAKU * fix: let rln_credential_store_ready to raise exception for retry * fix: let register_rln to raise exception too, when credential fine still not available * fix: remove container stop * fix: tune down retry timeouts * fix: remove unnecessary f-string * test: reduce unnecessary variables init * test: undo reduce unnecessary variables init * test: increase timeout for rln_credential_store_ready * test: refactor kwargs handling into sanitize_docker_flags * fix: created RLN registration check - changed rln_credential_store_ready to function * fix: delete unnecessary ports from register_rln init * fix: remove wait for registration entirely * test: RLN_CREDENTIALS env var example * fix: check_rln_registration to raise exception * fix: use f-string at check_rln_registration * fix: add gen_step_id function * fix: RLN_CREDENTIALS as loaded from .env * fix: RLN_CREDENTIALS example, skipping test if not set * test: RLN with actions * fix: tune up RLN timeouts for Github runners * test: filesystem write to / * fix: change RLN data to be stored at working directory * fix: catch exception instead of "if not" - print out container log * fix: wrap logs into debug msg * fix: print log file * fix: remove additional logging * fix: exit RLN cred parsing sooner when not used - delete proper keys from default_args * fix: Allure report * fix: Discord notifications * fix: remove f-string * fix: delete test workflow
2024-02-13 14:01:30 +00:00
import pytest
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
from src.env_vars import NODE_1, NODE_2, ADDITIONAL_NODES
from src.libs.common import delay, to_base64
chore: RLN registration support (#16) * chore: parameters and volumes for RLN relay * chore: add startup test for RLN * fix: remove redundant rln_enabled from WakuNode * fix: - and _ magic in rln parameters * fix: key 'eth_testnet_key' -> 'eth_client_private_key' * fix: rln-register_only -> rln-register-only * fix: use extend instead of append for the volumes list * fix: use absolute path for the volumes names - mark volumes shared across containers * fix: remove :z attr from volumes * fix: remove filename from volume path * fix: remove request for ENR * test: plain RLN registration * fix: remove subscribe * fix: remove ENR related params * test: add run_container func to Docker Mananger * fix: remove run_container func from Docker Mananger - no need for exec * fix: pass exec commands instead of specialized docker exec func * fix: exclude RLN arguments from others * fix: separate RLN volumes by implementation * test: registration with nwaku * test: registration over existing credentials * test: add RLN Relay node startup * test: RLN credentials reuse for relay node startup * fix: clean up unnecessary commands * fix: clean up unnecessary commands for non RLN relay too * test: regression by sending one valid message * fix: add forgotten call to get enr_uri * fix: check RLN credentials set properly * fix: parenthesis in eval expression * fix: better check for RLN credentials * fix: update to new flags - gowaku - separate private key for go/nwaku * test: register RLN * fix: RLN credentials check * fix: remove enable rln-relay flag from registration * test: reorder commands to check go-waku registration * fix: restructure if statements for RLN registration * fix: different set of flag for RLN registration and operation * fix: forgotten "eth" in eth-contract-address * fix: remove redundant None from get_env_var call * fix: refactor rln credentials parsing from start function * fix: missed second return value * test: call to parse_rln_credentials * fix: remove redundant self in call to parse_rln_credentials * fix: remove rln related values if not valid * fix: refactored to accept multiple private keys - JSON source for RLN credentials - removed go-waku support for RLN * test: register RLN with 2 nwaku nodes * fix: missing open file, key errors * fix: return effective keystore_path * fix: cleanup unused env variables * fix: cleanup unused env variables from relay * fix: wait longer for credentials file to be written to disk * test: remove waiting for credentials file to be written to disk * fix: add select_private_key() * fix: merge parse_rln_credentials and parse_rln_registration_credentials * test: wait for filesystem cache * test: try with os.sync to flush cache * test: stop container to clear cache * fix: 15 sec wait + stop container to clear cache * test: RLN registration test with fixture and cred file check * test: added allure.step - RLN registration for single node - corresponding test to register all keys * fix: f-strings in the test * fix: sync naming for register_main_rln_relay_nodes * fix: add WARN message to log unset and expected RLN credentials * fix: pytest.skip added to exit tests when non nwaku image is used * fix: swap NODE2 for DEFAULT_NWAKU * fix: let rln_credential_store_ready to raise exception for retry * fix: let register_rln to raise exception too, when credential fine still not available * fix: remove container stop * fix: tune down retry timeouts * fix: remove unnecessary f-string * test: reduce unnecessary variables init * test: undo reduce unnecessary variables init * test: increase timeout for rln_credential_store_ready * test: refactor kwargs handling into sanitize_docker_flags * fix: created RLN registration check - changed rln_credential_store_ready to function * fix: delete unnecessary ports from register_rln init * fix: remove wait for registration entirely * test: RLN_CREDENTIALS env var example * fix: check_rln_registration to raise exception * fix: use f-string at check_rln_registration * fix: add gen_step_id function * fix: RLN_CREDENTIALS as loaded from .env * fix: RLN_CREDENTIALS example, skipping test if not set * test: RLN with actions * fix: tune up RLN timeouts for Github runners * test: filesystem write to / * fix: change RLN data to be stored at working directory * fix: catch exception instead of "if not" - print out container log * fix: wrap logs into debug msg * fix: print log file * fix: remove additional logging * fix: exit RLN cred parsing sooner when not used - delete proper keys from default_args * fix: Allure report * fix: Discord notifications * fix: remove f-string * fix: delete test workflow
2024-02-13 14:01:30 +00:00
from src.libs.custom_logger import get_custom_logger
from src.steps.relay import StepsRelay
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
from src.steps.rln import StepsRLN
from src.test_data import SAMPLE_INPUTS
chore: RLN registration support (#16) * chore: parameters and volumes for RLN relay * chore: add startup test for RLN * fix: remove redundant rln_enabled from WakuNode * fix: - and _ magic in rln parameters * fix: key 'eth_testnet_key' -> 'eth_client_private_key' * fix: rln-register_only -> rln-register-only * fix: use extend instead of append for the volumes list * fix: use absolute path for the volumes names - mark volumes shared across containers * fix: remove :z attr from volumes * fix: remove filename from volume path * fix: remove request for ENR * test: plain RLN registration * fix: remove subscribe * fix: remove ENR related params * test: add run_container func to Docker Mananger * fix: remove run_container func from Docker Mananger - no need for exec * fix: pass exec commands instead of specialized docker exec func * fix: exclude RLN arguments from others * fix: separate RLN volumes by implementation * test: registration with nwaku * test: registration over existing credentials * test: add RLN Relay node startup * test: RLN credentials reuse for relay node startup * fix: clean up unnecessary commands * fix: clean up unnecessary commands for non RLN relay too * test: regression by sending one valid message * fix: add forgotten call to get enr_uri * fix: check RLN credentials set properly * fix: parenthesis in eval expression * fix: better check for RLN credentials * fix: update to new flags - gowaku - separate private key for go/nwaku * test: register RLN * fix: RLN credentials check * fix: remove enable rln-relay flag from registration * test: reorder commands to check go-waku registration * fix: restructure if statements for RLN registration * fix: different set of flag for RLN registration and operation * fix: forgotten "eth" in eth-contract-address * fix: remove redundant None from get_env_var call * fix: refactor rln credentials parsing from start function * fix: missed second return value * test: call to parse_rln_credentials * fix: remove redundant self in call to parse_rln_credentials * fix: remove rln related values if not valid * fix: refactored to accept multiple private keys - JSON source for RLN credentials - removed go-waku support for RLN * test: register RLN with 2 nwaku nodes * fix: missing open file, key errors * fix: return effective keystore_path * fix: cleanup unused env variables * fix: cleanup unused env variables from relay * fix: wait longer for credentials file to be written to disk * test: remove waiting for credentials file to be written to disk * fix: add select_private_key() * fix: merge parse_rln_credentials and parse_rln_registration_credentials * test: wait for filesystem cache * test: try with os.sync to flush cache * test: stop container to clear cache * fix: 15 sec wait + stop container to clear cache * test: RLN registration test with fixture and cred file check * test: added allure.step - RLN registration for single node - corresponding test to register all keys * fix: f-strings in the test * fix: sync naming for register_main_rln_relay_nodes * fix: add WARN message to log unset and expected RLN credentials * fix: pytest.skip added to exit tests when non nwaku image is used * fix: swap NODE2 for DEFAULT_NWAKU * fix: let rln_credential_store_ready to raise exception for retry * fix: let register_rln to raise exception too, when credential fine still not available * fix: remove container stop * fix: tune down retry timeouts * fix: remove unnecessary f-string * test: reduce unnecessary variables init * test: undo reduce unnecessary variables init * test: increase timeout for rln_credential_store_ready * test: refactor kwargs handling into sanitize_docker_flags * fix: created RLN registration check - changed rln_credential_store_ready to function * fix: delete unnecessary ports from register_rln init * fix: remove wait for registration entirely * test: RLN_CREDENTIALS env var example * fix: check_rln_registration to raise exception * fix: use f-string at check_rln_registration * fix: add gen_step_id function * fix: RLN_CREDENTIALS as loaded from .env * fix: RLN_CREDENTIALS example, skipping test if not set * test: RLN with actions * fix: tune up RLN timeouts for Github runners * test: filesystem write to / * fix: change RLN data to be stored at working directory * fix: catch exception instead of "if not" - print out container log * fix: wrap logs into debug msg * fix: print log file * fix: remove additional logging * fix: exit RLN cred parsing sooner when not used - delete proper keys from default_args * fix: Allure report * fix: Discord notifications * fix: remove f-string * fix: delete test workflow
2024-02-13 14:01:30 +00:00
logger = get_custom_logger(__name__)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
class TestRelayRLN(StepsRLN, StepsRelay):
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
SAMPLE_INPUTS_RLN = SAMPLE_INPUTS + SAMPLE_INPUTS + SAMPLE_INPUTS
def test_valid_payloads_lightpush_at_spam_rate(self, pytestconfig):
message_limit = 1
epoch_sec = 1
pytestconfig.cache.set("keystore-prefixes", self.register_rln_relay_nodes(2, []))
self.setup_first_rln_relay_node(lightpush="true", rln_relay_user_message_limit=message_limit, rln_relay_epoch_sec=epoch_sec)
self.setup_second_rln_lightpush_node(rln_relay_user_message_limit=message_limit, rln_relay_epoch_sec=epoch_sec)
self.subscribe_main_relay_nodes()
start = math.trunc(time())
for i, payload in enumerate(SAMPLE_INPUTS[:5]):
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
logger.debug(f"Sending message No. #{i + 1}")
now = math.trunc(time())
self.publish_message(message=message, sender=self.light_push_node2, use_lightpush=True)
if i > message_limit and (now - start) <= epoch_sec:
raise AssertionError("Publish with RLN enabled at spam rate worked!!!")
except Exception as e:
assert "RLN validation failed" or "NonceLimitReached" in str(e)
def test_valid_payloads_at_slow_rate(self, pytestconfig):
message_limit = 20
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
self.setup_main_rln_relay_nodes(rln_relay_user_message_limit=message_limit, rln_relay_epoch_sec=600)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
failed_payloads = []
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
for i, payload in enumerate(self.SAMPLE_INPUTS_RLN):
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
logger.debug(f"Sending message No. #{i + 1}")
self.check_published_message_reaches_relay_peer(message, message_propagation_delay=0.2)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
except Exception as e:
logger.error(f'Payload {payload["description"]} failed: {str(e)}')
failed_payloads.append(payload["description"])
delay(1)
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
if i == message_limit - 1:
break
chore: RLN registration support (#16) * chore: parameters and volumes for RLN relay * chore: add startup test for RLN * fix: remove redundant rln_enabled from WakuNode * fix: - and _ magic in rln parameters * fix: key 'eth_testnet_key' -> 'eth_client_private_key' * fix: rln-register_only -> rln-register-only * fix: use extend instead of append for the volumes list * fix: use absolute path for the volumes names - mark volumes shared across containers * fix: remove :z attr from volumes * fix: remove filename from volume path * fix: remove request for ENR * test: plain RLN registration * fix: remove subscribe * fix: remove ENR related params * test: add run_container func to Docker Mananger * fix: remove run_container func from Docker Mananger - no need for exec * fix: pass exec commands instead of specialized docker exec func * fix: exclude RLN arguments from others * fix: separate RLN volumes by implementation * test: registration with nwaku * test: registration over existing credentials * test: add RLN Relay node startup * test: RLN credentials reuse for relay node startup * fix: clean up unnecessary commands * fix: clean up unnecessary commands for non RLN relay too * test: regression by sending one valid message * fix: add forgotten call to get enr_uri * fix: check RLN credentials set properly * fix: parenthesis in eval expression * fix: better check for RLN credentials * fix: update to new flags - gowaku - separate private key for go/nwaku * test: register RLN * fix: RLN credentials check * fix: remove enable rln-relay flag from registration * test: reorder commands to check go-waku registration * fix: restructure if statements for RLN registration * fix: different set of flag for RLN registration and operation * fix: forgotten "eth" in eth-contract-address * fix: remove redundant None from get_env_var call * fix: refactor rln credentials parsing from start function * fix: missed second return value * test: call to parse_rln_credentials * fix: remove redundant self in call to parse_rln_credentials * fix: remove rln related values if not valid * fix: refactored to accept multiple private keys - JSON source for RLN credentials - removed go-waku support for RLN * test: register RLN with 2 nwaku nodes * fix: missing open file, key errors * fix: return effective keystore_path * fix: cleanup unused env variables * fix: cleanup unused env variables from relay * fix: wait longer for credentials file to be written to disk * test: remove waiting for credentials file to be written to disk * fix: add select_private_key() * fix: merge parse_rln_credentials and parse_rln_registration_credentials * test: wait for filesystem cache * test: try with os.sync to flush cache * test: stop container to clear cache * fix: 15 sec wait + stop container to clear cache * test: RLN registration test with fixture and cred file check * test: added allure.step - RLN registration for single node - corresponding test to register all keys * fix: f-strings in the test * fix: sync naming for register_main_rln_relay_nodes * fix: add WARN message to log unset and expected RLN credentials * fix: pytest.skip added to exit tests when non nwaku image is used * fix: swap NODE2 for DEFAULT_NWAKU * fix: let rln_credential_store_ready to raise exception for retry * fix: let register_rln to raise exception too, when credential fine still not available * fix: remove container stop * fix: tune down retry timeouts * fix: remove unnecessary f-string * test: reduce unnecessary variables init * test: undo reduce unnecessary variables init * test: increase timeout for rln_credential_store_ready * test: refactor kwargs handling into sanitize_docker_flags * fix: created RLN registration check - changed rln_credential_store_ready to function * fix: delete unnecessary ports from register_rln init * fix: remove wait for registration entirely * test: RLN_CREDENTIALS env var example * fix: check_rln_registration to raise exception * fix: use f-string at check_rln_registration * fix: add gen_step_id function * fix: RLN_CREDENTIALS as loaded from .env * fix: RLN_CREDENTIALS example, skipping test if not set * test: RLN with actions * fix: tune up RLN timeouts for Github runners * test: filesystem write to / * fix: change RLN data to be stored at working directory * fix: catch exception instead of "if not" - print out container log * fix: wrap logs into debug msg * fix: print log file * fix: remove additional logging * fix: exit RLN cred parsing sooner when not used - delete proper keys from default_args * fix: Allure report * fix: Discord notifications * fix: remove f-string * fix: delete test workflow
2024-02-13 14:01:30 +00:00
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
def test_valid_payloads_at_spam_rate(self, pytestconfig):
message_limit = 20
epoch_sec = 600
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
self.setup_main_rln_relay_nodes(rln_relay_user_message_limit=message_limit, rln_relay_epoch_sec=epoch_sec)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
start = math.trunc(time())
for i, payload in enumerate(self.SAMPLE_INPUTS_RLN):
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
logger.debug(f"Sending message No. #{i + 1}")
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
now = math.trunc(time())
self.publish_message(message)
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
if i > message_limit and (now - start) <= epoch_sec:
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
raise AssertionError("Publish with RLN enabled at spam rate worked!!!")
except Exception as e:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
assert "RLN validation failed" or "NonceLimitReached" in str(e)
chore: RLN registration support (#16) * chore: parameters and volumes for RLN relay * chore: add startup test for RLN * fix: remove redundant rln_enabled from WakuNode * fix: - and _ magic in rln parameters * fix: key 'eth_testnet_key' -> 'eth_client_private_key' * fix: rln-register_only -> rln-register-only * fix: use extend instead of append for the volumes list * fix: use absolute path for the volumes names - mark volumes shared across containers * fix: remove :z attr from volumes * fix: remove filename from volume path * fix: remove request for ENR * test: plain RLN registration * fix: remove subscribe * fix: remove ENR related params * test: add run_container func to Docker Mananger * fix: remove run_container func from Docker Mananger - no need for exec * fix: pass exec commands instead of specialized docker exec func * fix: exclude RLN arguments from others * fix: separate RLN volumes by implementation * test: registration with nwaku * test: registration over existing credentials * test: add RLN Relay node startup * test: RLN credentials reuse for relay node startup * fix: clean up unnecessary commands * fix: clean up unnecessary commands for non RLN relay too * test: regression by sending one valid message * fix: add forgotten call to get enr_uri * fix: check RLN credentials set properly * fix: parenthesis in eval expression * fix: better check for RLN credentials * fix: update to new flags - gowaku - separate private key for go/nwaku * test: register RLN * fix: RLN credentials check * fix: remove enable rln-relay flag from registration * test: reorder commands to check go-waku registration * fix: restructure if statements for RLN registration * fix: different set of flag for RLN registration and operation * fix: forgotten "eth" in eth-contract-address * fix: remove redundant None from get_env_var call * fix: refactor rln credentials parsing from start function * fix: missed second return value * test: call to parse_rln_credentials * fix: remove redundant self in call to parse_rln_credentials * fix: remove rln related values if not valid * fix: refactored to accept multiple private keys - JSON source for RLN credentials - removed go-waku support for RLN * test: register RLN with 2 nwaku nodes * fix: missing open file, key errors * fix: return effective keystore_path * fix: cleanup unused env variables * fix: cleanup unused env variables from relay * fix: wait longer for credentials file to be written to disk * test: remove waiting for credentials file to be written to disk * fix: add select_private_key() * fix: merge parse_rln_credentials and parse_rln_registration_credentials * test: wait for filesystem cache * test: try with os.sync to flush cache * test: stop container to clear cache * fix: 15 sec wait + stop container to clear cache * test: RLN registration test with fixture and cred file check * test: added allure.step - RLN registration for single node - corresponding test to register all keys * fix: f-strings in the test * fix: sync naming for register_main_rln_relay_nodes * fix: add WARN message to log unset and expected RLN credentials * fix: pytest.skip added to exit tests when non nwaku image is used * fix: swap NODE2 for DEFAULT_NWAKU * fix: let rln_credential_store_ready to raise exception for retry * fix: let register_rln to raise exception too, when credential fine still not available * fix: remove container stop * fix: tune down retry timeouts * fix: remove unnecessary f-string * test: reduce unnecessary variables init * test: undo reduce unnecessary variables init * test: increase timeout for rln_credential_store_ready * test: refactor kwargs handling into sanitize_docker_flags * fix: created RLN registration check - changed rln_credential_store_ready to function * fix: delete unnecessary ports from register_rln init * fix: remove wait for registration entirely * test: RLN_CREDENTIALS env var example * fix: check_rln_registration to raise exception * fix: use f-string at check_rln_registration * fix: add gen_step_id function * fix: RLN_CREDENTIALS as loaded from .env * fix: RLN_CREDENTIALS example, skipping test if not set * test: RLN with actions * fix: tune up RLN timeouts for Github runners * test: filesystem write to / * fix: change RLN data to be stored at working directory * fix: catch exception instead of "if not" - print out container log * fix: wrap logs into debug msg * fix: print log file * fix: remove additional logging * fix: exit RLN cred parsing sooner when not used - delete proper keys from default_args * fix: Allure report * fix: Discord notifications * fix: remove f-string * fix: delete test workflow
2024-02-13 14:01:30 +00:00
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
def test_valid_payload_at_variable_rate(self, pytestconfig):
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
self.setup_main_rln_relay_nodes(rln_relay_user_message_limit=1, rln_relay_epoch_sec=1)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
payload_desc = SAMPLE_INPUTS[0]["description"]
payload = to_base64(SAMPLE_INPUTS[0]["value"])
previous = math.trunc(time())
for i in range(0, 10):
logger.debug(f"Running test with payload {payload_desc}")
message = self.create_message(payload=payload)
try:
if i % 2 == 1: # every odd iteration is sent slowly
delay(1 + 1)
now = math.trunc(time())
logger.debug(f"Message sent at timestamp {now}")
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
logger.debug(f"Sending message No. #{i + 1}")
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.publish_message(message)
if i > 0 and (now - previous) == 0:
raise AssertionError("Publish with RLN enabled at spam rate worked!!!")
else:
previous = now
except Exception as e:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
assert "RLN validation failed" or "NonceLimitReached" in str(e)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
def test_valid_payloads_random_epoch_at_slow_rate(self, pytestconfig):
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
epoch_sec = random.randint(2, 5)
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
self.setup_main_rln_relay_nodes(rln_relay_user_message_limit=1, rln_relay_epoch_sec=epoch_sec)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
failed_payloads = []
for payload in SAMPLE_INPUTS[:5]:
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
self.check_published_message_reaches_relay_peer(message, message_propagation_delay=0.2)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
except Exception as e:
logger.error(f'Payload {payload["description"]} failed: {str(e)}')
failed_payloads.append(payload["description"])
delay(epoch_sec)
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
def test_valid_payloads_random_user_message_limit(self, pytestconfig):
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
user_message_limit = random.randint(2, 4)
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
self.setup_main_rln_relay_nodes(rln_relay_user_message_limit=user_message_limit, rln_relay_epoch_sec=1)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
failed_payloads = []
for payload in SAMPLE_INPUTS[:user_message_limit]:
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
self.publish_message(message)
except Exception as e:
logger.error(f'Payload {payload["description"]} failed: {str(e)}')
failed_payloads.append(payload["description"])
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
@pytest.mark.timeout(600)
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
def test_valid_payloads_dynamic_at_spam_rate(self, pytestconfig):
message_limit = 100
epoch_sec = 600
pytestconfig.cache.set("keystore-prefixes", self.register_rln_relay_nodes(2, []))
self.setup_main_rln_relay_nodes(
rln_relay_user_message_limit=message_limit,
rln_relay_epoch_sec=epoch_sec,
rln_relay_dynamic="true",
wait_for_node_sec=600,
)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
start = math.trunc(time())
for i, payload in enumerate(self.SAMPLE_INPUTS_RLN):
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
logger.debug(f"Sending message No. #{i + 1}")
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
now = math.trunc(time())
self.publish_message(message)
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
if i > message_limit and (now - start) <= epoch_sec:
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
raise AssertionError("Publish with RLN enabled at spam rate worked!!!")
except Exception as e:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
assert "RLN validation failed" or "NonceLimitReached" in str(e)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
@pytest.mark.timeout(600)
def test_valid_payloads_dynamic_at_slow_rate(self, pytestconfig):
message_limit = 100
pytestconfig.cache.set("keystore-prefixes", self.register_rln_relay_nodes(2, []))
self.setup_main_rln_relay_nodes(
rln_relay_user_message_limit=message_limit,
rln_relay_epoch_sec=600,
rln_relay_dynamic="true",
wait_for_node_sec=600,
)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
failed_payloads = []
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
for i, payload in enumerate(self.SAMPLE_INPUTS_RLN):
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
logger.debug(f"Sending message No. #{i + 1}")
self.check_published_message_reaches_relay_peer(message, message_propagation_delay=0.2)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
except Exception as e:
logger.error(f'Payload {payload["description"]} failed: {str(e)}')
failed_payloads.append(payload["description"])
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
delay(1)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
if i == message_limit - 1:
break
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
def test_valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate(self, pytestconfig):
message_limit = 1
epoch_sec = 1
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
self.setup_first_rln_relay_node(rln_relay_user_message_limit=message_limit, rln_relay_epoch_sec=epoch_sec)
self.setup_second_relay_node()
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
start = math.trunc(time())
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
for i, payload in enumerate(SAMPLE_INPUTS[:5]):
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
now = math.trunc(time())
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
self.publish_message(message)
if i > message_limit and (now - start) <= epoch_sec:
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
raise AssertionError("Publish with RLN enabled at spam rate worked!!!")
except Exception as e:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
assert "RLN validation failed" or "NonceLimitReached" in str(e)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
@pytest.mark.skipif("go-waku" in ADDITIONAL_NODES, reason="Test works only with nwaku")
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
def test_valid_payloads_with_optional_nodes_at_slow_rate(self, pytestconfig):
pytestconfig.cache.set("keystore-prefixes", self.register_rln_relay_nodes(5, []))
self.setup_main_rln_relay_nodes(rln_relay_user_message_limit=1, rln_relay_epoch_sec=1)
self.setup_optional_rln_relay_nodes(rln_relay_user_message_limit=1, rln_relay_epoch_sec=1)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
self.subscribe_optional_relay_nodes()
failed_payloads = []
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
for i, payload in enumerate(SAMPLE_INPUTS):
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
logger.debug(f"Sending message No. #{i + 1}")
self.check_published_message_reaches_relay_peer(message, message_propagation_delay=0.2)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
except Exception as e:
logger.error(f'Payload {payload["description"]} failed: {str(e)}')
failed_payloads.append(payload["description"])
delay(1)
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
@pytest.mark.skipif("go-waku" in ADDITIONAL_NODES, reason="Test works only with nwaku")
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
def test_valid_payloads_with_optional_nodes_at_spam_rate(self, pytestconfig):
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
self.setup_main_rln_relay_nodes(rln_relay_user_message_limit=1, rln_relay_epoch_sec=1)
self.setup_optional_rln_relay_nodes(rln_relay_user_message_limit=1, rln_relay_epoch_sec=1)
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
self.subscribe_main_relay_nodes()
self.subscribe_optional_relay_nodes()
previous = math.trunc(time())
for i, payload in enumerate(SAMPLE_INPUTS[:5]):
logger.debug(f'Running test with payload {payload["description"]}')
message = self.create_message(payload=to_base64(payload["value"]))
try:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
logger.debug(f"Sending message No. #{i + 1}")
chore: RLN relay tests (#30) * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: move RLN related code into separate class * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: reformated with pre-commit * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * fix: add get_multiaddr_with_id step - temporarily use local docker images * fix: discard containers used for RLN registration * fix: switch to use cluster ID 1 for RLN * test: publish at slow and spam rate * fix: shorten test data set * fix: rebase onto master * fix: use send only publish function - add spam and alternate rate tests * fix: use math.trunc instead of rounding * fix: first message without delay * fix: add one more second to messages with delay * fix: add methods to setup non default RLN nodes * fix: rewrite tests using steps rather than fixtures - prepare for non default settings for RLN * test: random epoch with valid_payloads_at_slow_rate * test: random user message limit with valid payloads * fix: skip test "random user message limit with valid payloads" * fix: mark flaky "at variable_rate with valid payloads" * fix: rename tests for easier debugging * fix: mark valid_payloads_dynamic_at_slow_rate to skip * fix: forgot to add actual file * test: valid payloads dynamic(on chain) at spam rate - extend timeout for ensure_ready() to 600s - add ensure_healthy() for future use - add text content based rest call - remove NODE1, NODE2 imports * fix: revert env_vars to source images from Harbor * fix: reuse setup first and second rln relay node for setup_main_rln_relay_nodes * fix: reuse register_rln_single_node for register_main_rln_relay_nodes * fix: start using src.steps.common - removed RLN test class inheritance from StepsRelay * fix: test using whole data set at test payloads_at_slow_rate * fix: switch to send msg and check for slow rate tests * fix: add comment for skip check at first message * fix: refactor payloads_at_variable_rate to use only one payload pattern * fix: remove the plural from payloads_at_variable_rate * fix: multiple class inheritance for TestRelayRLN * test: node1 with rln node2 without rln at spam rate * test: mixed epoch at slow rate * test: add lightpush methods * test: send valid payloads lightpush at spam rate * fix: node1 to act as light push receiving node - add setup lightpush node to spin off node2 with lightpush support * fix: use NODE1 NODE2 instead of DEFAULT_NWAKU * fix: no lightpush param required for plain RLN relay * fix: comment for lightpush * fix: comment for lightpush - wait for implementation * fix: comment on chain tests * fix: add lightpush case to publish_message * fix: remove check_light_pushed_message_reaches_receiving_peer from StepsRLN * fix: change comment for mixed_epoch_at_slow_rate * test: happy and common case with 5 nodes * fix: add all required fixtures explicitly * fix: add timeout param to ensure_ready * fix: skip RLN tests for go-waku * fix: uncomment skip for debugging * fix: put the skip back * fix: change comment for on chain tests * fix: run RLN tests in serial - add grouping of tests to runner - use smaller dataset for spam rate tests * test: Nim to Nim workflow * test: check also additional nodes for go-waku * test: all nodes are nwaku * fix: string quotes * fix: remove additional nodes * fix: re-arrange skip conditions * test: RLN only * fix: change default additional nodes to nwaku only * fix: change additional nodes rather at top level workflow * fix: enable all tests * test: problems with current workdir * test: rln only * test: correct typo * test: re-enable all tests - remove current dir debug * fix: nwaku additional nodes for nim to nim worklfow * fix: re-able discord notification - delete test workflow * test: re-test again after rebase * fix: wait longer for credential store * test: try again with Discord report off * fix: enable Discord - delete test workflow
2024-05-07 00:31:12 +00:00
now = math.trunc(time())
self.publish_message(message)
if i > 0 and (now - previous) == 0:
raise AssertionError("Publish with RLN enabled at spam rate worked!!!")
else:
previous = now
except Exception as e:
chore: RLNv2 tests update (#62) * test: node startup time for valid_payloads_dynamic_at_slow_rate * fix: remove timing debug info * fix: reuse existing keystore file * fix: remove skip marks for PR2612 * fix: remove skip marks for Issue 2837 * test: change valid_payloads_at_slow_rate to send 102 messages * fix: remove existing keystore before new registration * test: magical 20 messages * fix: omit RLN params for static mode - update test_valid_payloads_at_slow_rate - update test_valid_payloads_at_spam_rate * fix: condition check for rln-relay-dynamic * fix: update static tests - update test_valid_payloads_dynamic_at_slow_rate * fix: add rln-relay-user-message-limit to registration * fix: on-chain tests * fix: valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate * fix: rename lrn method for lightpush setup - delete test_valid_payloads_mixed_epoch_at_slow_rate * fix: test_valid_payloads_lightpush_at_spam_rate * fix: run registration only when necessary * fix: reorder tests - lightpush first - test workflow * fix: use touch instead of unlink * test: single test only test_valid_payloads_lightpush_at_spam_rate * test: run 2 tests * fix: remove reporting part from test workflow * fix: all tests * fix: use rmtree on keystore dir_path * fix: use external rm * fix: enable all RLN tests * fix: further optimize number or registrations * test: single on chain test * test: two on chain tests * test: swap order of tests * test: reduce test logging and output docker log * fix: rewrite keystore path related logic * fix: use cache for keystore prefixes * fix: index in setup_optional_rln_relay_nodes * fix: delete test workflows - revert env_vars
2024-08-09 08:13:17 +00:00
assert "RLN validation failed" or "NonceLimitReached" in str(e)