From c95fff8ac35cbb9a3aab574aa748c330ed91bec9 Mon Sep 17 00:00:00 2001 From: fbarbu15 Date: Wed, 27 Nov 2024 18:05:52 +0200 Subject: [PATCH] chore: fix go waku lightprotocol tests (#91) * chore: fix go waku lightprotocol tests * chore: fix go waku lightprotocol tests --- src/node/waku_node.py | 5 ++++- src/steps/light_push.py | 2 +- tests/e2e/test_e2e.py | 8 +++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/node/waku_node.py b/src/node/waku_node.py index 3669fa93..44886f95 100644 --- a/src/node/waku_node.py +++ b/src/node/waku_node.py @@ -14,7 +14,7 @@ from src.node.api_clients.rest import REST from src.node.docker_mananger import DockerManager from src.env_vars import DOCKER_LOG_DIR from src.data_storage import DS -from src.test_data import DEFAULT_CLUSTER_ID, LOG_ERROR_KEYWORDS +from src.test_data import DEFAULT_CLUSTER_ID, LOG_ERROR_KEYWORDS, VALID_PUBSUB_TOPICS logger = get_custom_logger(__name__) @@ -152,6 +152,9 @@ class WakuNode: default_args.update(sanitize_docker_flags(kwargs)) + if self.is_gowaku() and default_args.get("relay") == "false": + default_args["pubsub-topic"] = VALID_PUBSUB_TOPICS[1] + rln_args, rln_creds_set, keystore_path = self.parse_rln_credentials(default_args, False) default_args.pop("rln-creds-id", None) diff --git a/src/steps/light_push.py b/src/steps/light_push.py index ddd10a05..d4cb7d66 100644 --- a/src/steps/light_push.py +++ b/src/steps/light_push.py @@ -65,7 +65,7 @@ class StepsLightPush(StepsCommon): else: pytest.skip("ADDITIONAL_NODES/node_list is empty, cannot run test") for index, node in enumerate(nodes): - self.start_receiving_node(node, node_index=index + 2, lightpush="true", relay="true", **kwargs) + self.start_receiving_node(node, node_index=index + 2, lightpush="true", relay="true", pubsub_topic=self.test_pubsub_topic, **kwargs) @allure.step def setup_first_lightpush_node(self, lightpush="true", relay="false", **kwargs): diff --git a/tests/e2e/test_e2e.py b/tests/e2e/test_e2e.py index 2f70444a..e40131a3 100644 --- a/tests/e2e/test_e2e.py +++ b/tests/e2e/test_e2e.py @@ -348,7 +348,13 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush): logger.debug("Start 3 nodes with their corresponding config") self.node1.start(relay="true", store="true") self.node2.start(relay="true", store="true", filter="true", discv5_bootstrap_node=self.node1.get_enr_uri()) - self.node3.start(relay="true", filternode=self.node2.get_multiaddr_with_id(), store="false", discv5_bootstrap_node=self.node2.get_enr_uri()) + self.node3.start( + relay="true", + filternode=self.node2.get_multiaddr_with_id(), + store="false", + pubsub_topic=self.test_pubsub_topic, + discv5_bootstrap_node=self.node2.get_enr_uri(), + ) logger.debug("Subscribe nodes to relay pubsub topics") self.node1.set_relay_subscriptions([self.test_pubsub_topic])