chore: fix go waku lightprotocol tests (#91)

* chore: fix go waku lightprotocol tests

* chore: fix go waku lightprotocol tests
This commit is contained in:
fbarbu15 2024-11-27 18:05:52 +02:00 committed by GitHub
parent 348a14cdea
commit c95fff8ac3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 3 deletions

View File

@ -14,7 +14,7 @@ from src.node.api_clients.rest import REST
from src.node.docker_mananger import DockerManager from src.node.docker_mananger import DockerManager
from src.env_vars import DOCKER_LOG_DIR from src.env_vars import DOCKER_LOG_DIR
from src.data_storage import DS 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__) logger = get_custom_logger(__name__)
@ -152,6 +152,9 @@ class WakuNode:
default_args.update(sanitize_docker_flags(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) rln_args, rln_creds_set, keystore_path = self.parse_rln_credentials(default_args, False)
default_args.pop("rln-creds-id", None) default_args.pop("rln-creds-id", None)

View File

@ -65,7 +65,7 @@ class StepsLightPush(StepsCommon):
else: else:
pytest.skip("ADDITIONAL_NODES/node_list is empty, cannot run test") pytest.skip("ADDITIONAL_NODES/node_list is empty, cannot run test")
for index, node in enumerate(nodes): 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 @allure.step
def setup_first_lightpush_node(self, lightpush="true", relay="false", **kwargs): def setup_first_lightpush_node(self, lightpush="true", relay="false", **kwargs):

View File

@ -348,7 +348,13 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
logger.debug("Start 3 nodes with their corresponding config") logger.debug("Start 3 nodes with their corresponding config")
self.node1.start(relay="true", store="true") 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.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") logger.debug("Subscribe nodes to relay pubsub topics")
self.node1.set_relay_subscriptions([self.test_pubsub_topic]) self.node1.set_relay_subscriptions([self.test_pubsub_topic])