mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-05-18 08:19:32 +00:00
fix: start using src.steps.common
- removed RLN test class inheritance from StepsRelay
This commit is contained in:
parent
99387d684f
commit
2a38bae21f
@ -1,18 +1,18 @@
|
|||||||
from src.env_vars import DEFAULT_NWAKU, RLN_CREDENTIALS, NODEKEY
|
|
||||||
from src.libs.common import gen_step_id, to_base64
|
|
||||||
from src.libs.custom_logger import get_custom_logger
|
|
||||||
import os
|
import os
|
||||||
import inspect
|
import inspect
|
||||||
import pytest
|
import pytest
|
||||||
import allure
|
import allure
|
||||||
from time import time
|
from src.steps.common import StepsCommon
|
||||||
from src.node.waku_node import WakuNode, rln_credential_store_ready
|
|
||||||
from src.test_data import PUBSUB_TOPICS_RLN
|
from src.test_data import PUBSUB_TOPICS_RLN
|
||||||
|
from src.env_vars import DEFAULT_NWAKU, RLN_CREDENTIALS, NODEKEY
|
||||||
|
from src.libs.common import gen_step_id
|
||||||
|
from src.libs.custom_logger import get_custom_logger
|
||||||
|
from src.node.waku_node import WakuNode, rln_credential_store_ready
|
||||||
|
|
||||||
logger = get_custom_logger(__name__)
|
logger = get_custom_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class StepsRLN:
|
class StepsRLN(StepsCommon):
|
||||||
test_pubsub_topic = PUBSUB_TOPICS_RLN[0]
|
test_pubsub_topic = PUBSUB_TOPICS_RLN[0]
|
||||||
test_content_topic = "/test/1/waku-rln-relay/proto"
|
test_content_topic = "/test/1/waku-rln-relay/proto"
|
||||||
test_payload = "RLN relay works!!"
|
test_payload = "RLN relay works!!"
|
||||||
@ -70,12 +70,6 @@ class StepsRLN:
|
|||||||
logger.error(f"Credentials at {creds_file_path} not available: {ex}")
|
logger.error(f"Credentials at {creds_file_path} not available: {ex}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
@allure.step
|
|
||||||
def create_message(self, **kwargs):
|
|
||||||
message = {"payload": to_base64(self.test_payload), "contentTopic": self.test_content_topic, "timestamp": int(time() * 1e9)}
|
|
||||||
message.update(kwargs)
|
|
||||||
return message
|
|
||||||
|
|
||||||
@allure.step
|
@allure.step
|
||||||
def publish_message(self, message=None, pubsub_topic=None, sender=None):
|
def publish_message(self, message=None, pubsub_topic=None, sender=None):
|
||||||
if message is None:
|
if message is None:
|
||||||
|
|||||||
@ -14,7 +14,7 @@ logger = get_custom_logger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("register_main_rln_relay_nodes")
|
@pytest.mark.usefixtures("register_main_rln_relay_nodes")
|
||||||
class TestRelayRLN(StepsRLN, StepsRelay):
|
class TestRelayRLN(StepsRLN):
|
||||||
def test_publish_with_valid_payloads_at_slow_rate(self):
|
def test_publish_with_valid_payloads_at_slow_rate(self):
|
||||||
self.setup_main_rln_relay_nodes()
|
self.setup_main_rln_relay_nodes()
|
||||||
self.subscribe_main_relay_nodes()
|
self.subscribe_main_relay_nodes()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user