Skip to content

Commit

Permalink
chore: fix go waku lightprotocol tests (#91)
Browse files Browse the repository at this point in the history
* chore: fix go waku lightprotocol tests

* chore: fix go waku lightprotocol tests
  • Loading branch information
fbarbu15 authored Nov 27, 2024
1 parent 348a14c commit c95fff8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/node/waku_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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__)

Expand Down Expand Up @@ -152,6 +152,9 @@ def start(self, wait_for_node_sec=20, **kwargs):

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)
Expand Down
2 changes: 1 addition & 1 deletion src/steps/light_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def setup_additional_receiving_nodes(self, node_list=ADDITIONAL_NODES, **kwargs)
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):
Expand Down
8 changes: 7 additions & 1 deletion tests/e2e/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,13 @@ def test_repeated_filter_requestID(self):
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])
Expand Down

0 comments on commit c95fff8

Please sign in to comment.