Merge remote-tracking branch 'origin/master' into waky-sync-E2E

This commit is contained in:
aya 2025-06-19 14:28:52 +03:00
commit 2cc483efe3
37 changed files with 45 additions and 192 deletions

View File

@ -121,15 +121,7 @@ class WakuNode:
# "filter-subscription-timeout": "600",
}
if self.is_gowaku():
go_waku_args = {
"min-relay-peers-to-publish": "1",
"log-level": "DEBUG",
"rest-filter-cache-capacity": "50",
"peer-store-capacity": "10",
}
default_args.update(go_waku_args)
elif self.is_nwaku():
if self.is_nwaku():
nwaku_args = {
"shard": "0",
"metrics-server": "true",
@ -152,13 +144,6 @@ class WakuNode:
default_args.update(sanitize_docker_flags(kwargs))
if self.is_gowaku():
if default_args.get("relay") == "false" and "pubsub-topic" not in default_args:
logger.info(f"Adding pubsub-topic={VALID_PUBSUB_TOPICS[1]} to default args for go-waku")
default_args["pubsub-topic"] = VALID_PUBSUB_TOPICS[1]
if "shard" in default_args:
del default_args["shard"]
if self.is_nwaku() and "pubsub-topic" in default_args:
logger.debug("Removing pubsub-topic from nwaku args")
del default_args["pubsub-topic"]
@ -271,21 +256,18 @@ class WakuNode:
@retry(stop=stop_after_delay(timeout_duration), wait=wait_fixed(0.1), reraise=True)
def check_healthy(node=self):
self.health_response = node.health()
if self.health_response == b"Node is healthy":
logger.info("Node is healthy !!")
return
try:
self.health_response = json.loads(self.health_response)
except Exception as ex:
raise AttributeError(f"Unknown health response format {ex}")
if self.health_response.get("nodeHealth") != "Ready":
raise AssertionError("Waiting for the node health status: Ready")
if self.health_response.get("nodeHealth") != "READY":
raise AssertionError("Waiting for the node health status: READY")
for p in self.health_response.get("protocolsHealth"):
if p.get("Rln Relay") != "Ready":
raise AssertionError("Waiting for the Rln relay status: Ready")
# for p in self.health_response.get("protocolsHealth"):
# if p.get("Rln Relay") != "READY":
# raise AssertionError("Waiting for the Rln relay status: READY")
logger.info("Node protocols are initialized !!")
@ -431,17 +413,12 @@ class WakuNode:
def type(self):
if self.is_nwaku():
return "nwaku"
elif self.is_gowaku():
return "gowaku"
else:
raise ValueError("Unknown node type!!!")
def is_nwaku(self):
return "nwaku" in self.image
def is_gowaku(self):
return "go-waku" in self.image
def parse_rln_credentials(self, default_args, is_registration):
rln_args = {}
keystore_path = None
@ -513,10 +490,6 @@ class WakuNode:
def parse_peer_persistence_config(self, kwargs):
if kwargs.get("peer_persistence") == "true":
if self.is_gowaku():
kwargs["persist_peers"] = kwargs["peer_persistence"]
del kwargs["peer_persistence"]
cwd = os.getcwd()
# Please note, as of now, peerdb is stored directly at / which is not shareable between containers.
# Volume related code is usable after https://github.com/waku-org/nwaku/issues/2792 would be resolved.

View File

@ -27,10 +27,6 @@ class StepsCommon:
if node.is_nwaku():
for multiaddr in multiaddr_list:
node.add_peers([multiaddr])
elif node.is_gowaku():
for multiaddr in multiaddr_list:
peer_info = {"multiaddr": multiaddr, "protocols": ["/vac/waku/relay/2.0.0"], "shards": shards}
node.add_peers(peer_info)
@allure.step
@retry(stop=stop_after_delay(70), wait=wait_fixed(1), reraise=True)

View File

@ -61,8 +61,6 @@ class StepsFilter(StepsCommon):
def relay_node_start(self, node):
self.node1 = WakuNode(node, f"node1_{self.test_id}")
start_args = {"relay": "true", "filter": "true"}
if self.node1.is_gowaku():
start_args["min_relay_peers_to_publish"] = "0"
self.node1.start(**start_args)
self.enr_uri = self.node1.get_enr_uri()
self.multiaddr_with_id = self.node1.get_multiaddr_with_id()
@ -147,8 +145,6 @@ class StepsFilter(StepsCommon):
def update_filter_subscription(self, subscription, node=None):
if node is None:
node = self.node2
if node.is_gowaku():
pytest.skip(f"This method doesn't exist for node {node.type()}")
return node.update_filter_subscriptions(subscription)
@allure.step
@ -156,9 +152,6 @@ class StepsFilter(StepsCommon):
if node is None:
node = self.node2
delete_sub_response = node.delete_filter_subscriptions(subscription)
if node.is_gowaku() and "requestId" not in subscription:
assert delete_sub_response["requestId"] == ""
else:
assert delete_sub_response["requestId"] == subscription["requestId"]
if status is None:
assert delete_sub_response["statusDesc"] in ["OK"]
@ -198,9 +191,7 @@ class StepsFilter(StepsCommon):
def get_filter_messages(self, content_topic, pubsub_topic=None, node=None):
if node is None:
node = self.node2
if node.is_gowaku():
return node.get_filter_messages(content_topic, pubsub_topic)
elif node.is_nwaku():
if node.is_nwaku():
return node.get_filter_messages(content_topic)
else:
raise NotImplementedError("Not implemented for this node type")

View File

@ -38,8 +38,10 @@ class StepsRLN(StepsCommon):
@allure.step
def register_rln_relay_nodes(self, count, orig_prefixes):
if count > 0:
logger.debug(111111111111111)
self.keystore_prefixes = self.generate_keystore_prefixes(count)
for i, prefix in enumerate(self.keystore_prefixes):
logger.debug(000000000000000000000)
self.register_rln_single_node(prefix=prefix, rln_creds_source=RLN_CREDENTIALS, rln_creds_id=f"{i+1}")
else:
self.keystore_prefixes = orig_prefixes

View File

@ -165,9 +165,7 @@ class StepsSharding(StepsRelay):
def get_filter_messages(self, content_topic, pubsub_topic=None, node=None):
if node is None:
node = self.node2
if node.is_gowaku():
return node.get_filter_messages(content_topic, pubsub_topic)
elif node.is_nwaku():
if node.is_nwaku():
return node.get_filter_messages(content_topic)
else:
raise NotImplementedError("Not implemented for this node type")
@ -204,4 +202,4 @@ class StepsSharding(StepsRelay):
self.check_published_message_reaches_relay_peer(pubsub_topic=pubsub_topic)
raise AssertionError("Publishing messages on unsubscribed shard worked!!!")
except Exception as ex:
assert f"Failed to publish: Node not subscribed to topic: {pubsub_topic}" in str(ex)
assert "Failed to publish: Node not subscribed to topic" in str(ex), "Expected Bad Request because the node is not subscribed"

View File

@ -164,13 +164,6 @@ class StepsStore(StepsCommon):
):
if pubsub_topic is None:
pubsub_topic = self.test_pubsub_topic
if node.is_gowaku():
if content_topics is None:
content_topics = self.test_content_topic
if hashes is not None:
content_topics = None
pubsub_topic = None
peer_addr = self.multiaddr_list[0]
store_response = node.get_store_messages(
peer_addr=peer_addr,
include_data=include_data,

View File

@ -148,24 +148,24 @@ PUBSUB_TOPICS_WRONG_FORMAT = [
]
SAMPLE_TIMESTAMPS = [
{"description": "Now", "value": int(time() * 1e9), "valid_for": ["nwaku", "gowaku"]},
{"description": "Now", "value": int(time() * 1e9), "valid_for": ["nwaku"]},
{
"description": "Far future",
"value": int((NOW + timedelta(days=365 * 10)).timestamp() * 1e9),
"valid_for": ["nwaku", "gowaku"],
"valid_for": ["nwaku"],
}, # 10 years from now
{"description": "Recent past", "value": int((NOW - timedelta(hours=1)).timestamp() * 1e9), "valid_for": ["nwaku", "gowaku"]}, # 1 hour ago
{"description": "Near future", "value": int((NOW + timedelta(hours=1)).timestamp() * 1e9), "valid_for": ["nwaku", "gowaku"]}, # 1 hour ahead
{"description": "Positive number", "value": 1, "valid_for": ["nwaku", "gowaku"]},
{"description": "Negative number", "value": -1, "valid_for": ["nwaku", "gowaku"]},
{"description": "DST change", "value": int(datetime(2020, 3, 8, 2, 0, 0).timestamp() * 1e9), "valid_for": ["nwaku", "gowaku"]}, # DST starts
{"description": "Recent past", "value": int((NOW - timedelta(hours=1)).timestamp() * 1e9), "valid_for": ["nwaku"]}, # 1 hour ago
{"description": "Near future", "value": int((NOW + timedelta(hours=1)).timestamp() * 1e9), "valid_for": ["nwaku"]}, # 1 hour ahead
{"description": "Positive number", "value": 1, "valid_for": ["nwaku"]},
{"description": "Negative number", "value": -1, "valid_for": ["nwaku"]},
{"description": "DST change", "value": int(datetime(2020, 3, 8, 2, 0, 0).timestamp() * 1e9), "valid_for": ["nwaku"]}, # DST starts
{"description": "Timestamp as string number", "value": str(int(time() * 1e9)), "valid_for": []},
{"description": "Invalid large number", "value": 2**63, "valid_for": []},
{"description": "Float number", "value": float(time() * 1e9), "valid_for": []},
{"description": "Array instead of timestamp", "value": [int(time() * 1e9)], "valid_for": []},
{"description": "Object instead of timestamp", "value": {"time": int(time() * 1e9)}, "valid_for": []},
{"description": "ISO 8601 timestamp", "value": "2023-12-26T10:58:51", "valid_for": []},
{"description": "Missing", "value": None, "valid_for": ["gowaku"]},
{"description": "Missing", "value": None, "valid_for": []},
]
PUBSUB_TOPICS_RLN = ["/waku/2/rs/1/0"]
@ -205,11 +205,11 @@ METRICS_WITH_INITIAL_VALUE_ZERO = [
"waku_rln_spam_messages_total_total",
"waku_rln_valid_messages_total_sum",
"waku_rln_valid_messages_total_count",
'waku_rln_valid_messages_total_bucket{le="1.0"}',
'waku_rln_valid_messages_total_bucket{le="2.0"}',
'waku_rln_valid_messages_total_bucket{le="3.0"}',
'waku_rln_valid_messages_total_bucket{le="4.0"}',
'waku_rln_valid_messages_total_bucket{le="5.0"}',
'waku_rln_valid_messages_total_bucket{le="10.0"}',
'waku_rln_valid_messages_total_bucket{le="20.0"}',
'waku_rln_valid_messages_total_bucket{le="30.0"}',
'waku_rln_valid_messages_total_bucket{le="40.0"}',
'waku_rln_valid_messages_total_bucket{le="50.0"}',
'waku_rln_valid_messages_total_bucket{le="+Inf"}',
"waku_rln_proof_verification_total_total",
"waku_rln_number_registered_memberships",

View File

@ -181,8 +181,6 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
@pytest.mark.timeout(60 * 7)
def test_filter_20_senders_1_receiver(self):
total_senders = 20
if "go-waku" in NODE_2:
total_senders = 10
node_list = []
logger.debug(f"Start {total_senders} nodes to publish messages ")
@ -303,7 +301,6 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
assert len(response_list) == max_subscribed_nodes, "Received message count doesn't match sent "
@pytest.mark.skipif("go-waku" in NODE_2, reason="Test works only with nwaku")
@pytest.mark.smoke
def test_store_filter_interaction_with_six_nodes(self):
logger.debug("Create 6 nodes")
@ -409,7 +406,6 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
assert e.args[0].find("'messages': []"), "response for store shouldn't contain messages"
logger.debug("Message isn't stored as ephemeral = True")
@pytest.mark.skipif("go-waku" in NODE_2, reason="Test works only with nwaku")
def test_msg_stored_when_ephemeral_false(self):
logger.debug("Start 3 nodes")
self.node1.start(relay="true", store="true")
@ -428,7 +424,6 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
logger.debug("Check if message is stored ")
self.check_published_message_is_stored(page_size=50, ascending="true", store_node=self.node3, messages_to_check=[message])
@pytest.mark.skipif("go-waku" in NODE_2, reason="Test works only with nwaku")
def test_multiple_edge_service_nodes_communication(self):
self.edge_node1 = WakuNode(NODE_1, f"node4_{self.test_id}")
self.edge_node2 = WakuNode(NODE_1, f"node5_{self.test_id}")
@ -477,7 +472,6 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
messages_response = self.get_filter_messages(self.test_content_topic, pubsub_topic=self.test_pubsub_topic, node=self.edge_node2)
assert len(messages_response) == 1, "message counter isn't as expected "
@pytest.mark.skipif("go-waku" in NODE_2, reason="Error protocol not supported")
def test_store_no_peer_selected(self):
store_version = "v3"
logger.debug("Start 5 nodes")

View File

@ -59,8 +59,6 @@ class TestFilterGetMessages(StepsFilter):
self.check_published_message_reaches_filter_peer(self.create_message(extraField="extraValue"))
if self.node1.is_nwaku():
raise AssertionError("Relay publish with extra field worked!!!")
elif self.node1.is_gowaku():
pass
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:

View File

@ -22,8 +22,6 @@ class TestFilterPing(StepsFilter):
self.ping_filter_subscriptions("")
if self.node2.is_nwaku():
pass
elif self.node2.is_gowaku():
raise Exception("Ping without request id worked!!")
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:

View File

@ -27,12 +27,10 @@ class TestFilterSubscribeCreate(StepsFilter):
failed_pubsub_topics.append(pubsub_topic)
assert not failed_pubsub_topics, f"PubsubTopics failed: {failed_pubsub_topics}"
@pytest.mark.xfail("nwaku" in NODE_1 and "go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1054")
def test_filter_subscribe_to_pubsub_topic_from_another_cluster_id(self):
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic], pubsub_topic=self.another_cluster_pubsub_topic)
self.check_published_message_reaches_filter_peer(pubsub_topic=self.another_cluster_pubsub_topic)
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1054")
def test_filter_subscribe_to_pubsub_topics_from_multiple_clusters(self):
pubsub_topic_list = [self.test_pubsub_topic, self.another_cluster_pubsub_topic, self.second_pubsub_topic]
failed_pubsub_topics = []
@ -120,8 +118,6 @@ class TestFilterSubscribeCreate(StepsFilter):
self.create_filter_subscription({"requestId": "1", "pubsubTopic": self.test_pubsub_topic})
if self.node2.is_nwaku():
raise AssertionError("Subscribe with extra field worked!!!")
elif self.node2.is_gowaku():
pass
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:
@ -159,8 +155,6 @@ class TestFilterSubscribeCreate(StepsFilter):
)
if self.node2.is_nwaku():
raise AssertionError("Subscribe with extra field worked!!!")
elif self.node2.is_gowaku():
pass
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:

View File

@ -41,7 +41,7 @@ class TestFilterUnSubscribe(StepsFilter):
try:
self.delete_filter_subscription(
{"requestId": "1", "contentFilters": [self.second_content_topic], "pubsubTopic": self.test_pubsub_topic},
status="can't unsubscribe" if self.node2.is_gowaku() else "",
"",
)
except Exception as ex:
assert "Not Found" in str(ex) and "peer has no subscriptions" in str(ex)
@ -54,8 +54,6 @@ class TestFilterUnSubscribe(StepsFilter):
)
if self.node2.is_nwaku():
raise AssertionError("Unsubscribe with non existing pubsub topic worked!!!")
elif self.node2.is_gowaku():
pass
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:
@ -70,8 +68,6 @@ class TestFilterUnSubscribe(StepsFilter):
except Exception as ex:
if self.node2.is_nwaku():
assert "exceeds maximum content topics: 100" in str(ex)
elif self.node2.is_gowaku():
assert "Bad Request" in str(ex)
else:
raise NotImplementedError("Not implemented for this node type")
@ -121,8 +117,6 @@ class TestFilterUnSubscribe(StepsFilter):
)
if self.node2.is_nwaku():
raise AssertionError("Unsubscribe with no request id worked!!!")
elif self.node2.is_gowaku():
pass
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:
@ -142,8 +136,6 @@ class TestFilterUnSubscribe(StepsFilter):
)
if self.node2.is_nwaku():
raise AssertionError("Unsubscribe with extra field worked!!!")
elif self.node2.is_gowaku():
pass
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:

View File

@ -47,8 +47,6 @@ class TestFilterUnSubscribeAll(StepsFilter):
except Exception as ex:
if self.node2.is_nwaku():
assert "Not Found" in str(ex) and "peer has no subscriptions" in str(ex)
elif self.node2.is_gowaku():
assert "subscription not found" in str(ex)
else:
raise NotImplementedError("Not implemented for this node type")

View File

@ -224,8 +224,6 @@ class TestLightPushPublish(StepsLightPush):
self.check_light_pushed_message_reaches_receiving_peer(message=self.create_message(extraField="extraValue"))
if self.light_push_node1.is_nwaku():
raise AssertionError("Relay publish with extra field worked!!!")
elif self.light_push_node1.is_gowaku():
pass
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:
@ -269,6 +267,7 @@ class TestLightPushPublish(StepsLightPush):
self.receiving_node1.ensure_ready()
self.subscribe_and_light_push_with_retry()
@pytest.mark.skip(reason="waiting for https://github.com/waku-org/nwaku/issues/3444 resolution")
def test_light_push_and_retrieve_100_messages(self):
num_messages = 100 # if increase this number make sure to also increase rest-relay-cache-capacity flag
for index in range(num_messages):

View File

@ -77,7 +77,6 @@ class TestPeerStore(StepsRelay, StepsStore):
assert len(node1_peers) == 2 and len(node2_peers) == 2, f"Some nodes and/or their services are missing"
@pytest.mark.skip(reason="pending on https://github.com/waku-org/nwaku/issues/2792")
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_use_persistent_storage_survive_restart(self):
self.setup_first_relay_node(peer_persistence="true")
self.setup_second_relay_node()
@ -99,7 +98,6 @@ class TestPeerStore(StepsRelay, StepsStore):
assert node2_id == peer_info2id(node3_peers[0], self.node3.is_nwaku())
@pytest.mark.skip(reason="waiting for https://github.com/waku-org/nwaku/issues/2592 resolution")
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_peer_store_content_after_node2_restarts(self):
self.setup_first_relay_node()
self.setup_second_relay_node()

View File

@ -6,7 +6,6 @@ from src.steps.peer_exchange import StepsPeerExchange
from src.test_data import VALID_PUBSUB_TOPICS
@pytest.mark.skipif("go-waku" not in NODE_2, reason="Test works only with go-waku as responder - https://github.com/waku-org/nwaku/issues/2875")
class TestPeerExchange(StepsPeerExchange):
def test_get_peers_for_blank_node(self):
self.setup_first_relay_node(relay_peer_exchange="true")

View File

@ -184,8 +184,6 @@ class TestRelayPublish(StepsRelay):
self.check_published_message_reaches_relay_peer(self.create_message(extraField="extraValue"))
if self.node1.is_nwaku():
raise AssertionError("Relay publish with extra field worked!!!")
elif self.node1.is_gowaku():
pass
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:
@ -233,6 +231,7 @@ class TestRelayPublish(StepsRelay):
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
self.wait_for_published_message_to_reach_relay_peer()
@pytest.mark.skip(reason="waiting for https://github.com/waku-org/nwaku/issues/3444 resolution")
@pytest.mark.flaky(reruns=5)
def test_publish_and_retrieve_100_messages(self):
num_messages = 100 # if increase this number make sure to also increase rest-relay-cache-capacity flag

View File

@ -13,8 +13,8 @@ from src.test_data import SAMPLE_INPUTS
logger = get_custom_logger(__name__)
@pytest.mark.skip(reason="RLN functional changes. To be updated by Roman Zajic")
@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):
SAMPLE_INPUTS_RLN = SAMPLE_INPUTS + SAMPLE_INPUTS + SAMPLE_INPUTS
@ -208,7 +208,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
except Exception as e:
assert "RLN validation failed" or "NonceLimitReached" in str(e)
@pytest.mark.skipif("go-waku" in ADDITIONAL_NODES, reason="Test works only with nwaku")
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)
@ -228,7 +227,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
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")
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)

View File

@ -50,7 +50,6 @@ class TestRelaySubscribe(StepsRelay):
self.delete_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
self.check_publish_without_relay_subscription(self.test_pubsub_topic)
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1034")
def test_relay_unsubscribe_from_all_pubsub_topics(self):
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, VALID_PUBSUB_TOPICS)
for pubsub_topic in VALID_PUBSUB_TOPICS:
@ -76,8 +75,6 @@ class TestRelaySubscribe(StepsRelay):
self.delete_relay_subscriptions_on_nodes(self.main_nodes, VALID_PUBSUB_TOPICS[4:5])
if self.node1.is_nwaku():
pass # nwaku doesn't fail in this case
elif self.node1.is_gowaku():
raise AssertionError("Unsubscribe from non-subscribed pubsub_topic worked!!!")
else:
raise NotImplementedError("Not implemented for this node type")
except Exception as ex:

View File

@ -27,10 +27,6 @@ class TestFilterStaticSharding(StepsSharding):
self.check_published_message_reaches_filter_peer(content_topic=content_topic, pubsub_topic=pubsub_topic)
@pytest.mark.skipif(
"go-waku" in NODE_1 or "go-waku" in NODE_2,
reason="Autosharding tests work only on nwaku because of https://github.com/waku-org/go-waku/issues/1061",
)
class TestFilterAutoSharding(StepsSharding):
def test_filter_works_with_auto_sharding(self):
self.setup_first_relay_node_with_filter(

View File

@ -15,7 +15,6 @@ class TestMultipleNodes(StepsSharding):
self.subscribe_optional_relay_nodes(pubsub_topics=[self.test_pubsub_topic])
self.check_published_message_reaches_relay_peer(pubsub_topic=self.test_pubsub_topic)
@pytest.mark.skipif("go-waku" in NODE_2, reason="Test works only with nwaku")
def test_static_shard_relay_10_nwaku_nodes(self):
self.setup_first_relay_node_with_filter(pubsub_topic=self.test_pubsub_topic)
self.setup_nwaku_relay_nodes(num_nodes=9, pubsub_topic=self.test_pubsub_topic)
@ -23,10 +22,6 @@ class TestMultipleNodes(StepsSharding):
self.subscribe_optional_relay_nodes(pubsub_topics=[self.test_pubsub_topic])
self.check_published_message_reaches_relay_peer(pubsub_topic=self.test_pubsub_topic)
@pytest.mark.skipif(
"go-waku" in NODE_2 or "go-waku" in ADDITIONAL_NODES,
reason="Autosharding tests work only on nwaku because of https://github.com/waku-org/go-waku/issues/1061",
)
def test_auto_shard_relay(self):
self.setup_main_relay_nodes(cluster_id=self.auto_cluster, content_topic=self.test_content_topic)
self.setup_optional_relay_nodes(cluster_id=self.auto_cluster, content_topic=self.test_content_topic)
@ -34,7 +29,6 @@ class TestMultipleNodes(StepsSharding):
self.subscribe_optional_relay_nodes(content_topics=[self.test_content_topic])
self.check_published_message_reaches_relay_peer(content_topic=self.test_content_topic)
@pytest.mark.skipif("go-waku" in NODE_2, reason="Test works only with nwaku")
def test_auto_shard_relay_10_nwaku_nodes(self):
self.setup_first_relay_node_with_filter(cluster_id=self.auto_cluster, content_topic=self.test_content_topic)
self.setup_nwaku_relay_nodes(num_nodes=8, cluster_id=self.auto_cluster, content_topic=self.test_content_topic)

View File

@ -10,10 +10,6 @@ from src.test_data import CONTENT_TOPICS_DIFFERENT_SHARDS, CONTENT_TOPICS_SHARD_
logger = get_custom_logger(__name__)
@pytest.mark.skipif(
"go-waku" in NODE_1 or "go-waku" in NODE_2,
reason="Autosharding tests work only on nwaku because of https://github.com/waku-org/go-waku/issues/1061",
)
class TestRelayAutosharding(StepsSharding):
def test_publish_without_subscribing_via_api_works(self):
self.setup_main_relay_nodes(cluster_id=self.auto_cluster, content_topic=self.test_content_topic)

View File

@ -63,7 +63,6 @@ class TestRelayStaticSharding(StepsSharding):
self.check_published_message_reaches_relay_peer(pubsub_topic=pubsub_topic)
@pytest.mark.smoke
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1034")
def test_unsubscribe_from_all_pubsub_topics(self):
self.setup_main_relay_nodes(cluster_id=self.auto_cluster, pubsub_topic=PUBSUB_TOPICS_SAME_CLUSTER)
self.subscribe_main_relay_nodes(pubsub_topics=PUBSUB_TOPICS_SAME_CLUSTER)
@ -73,7 +72,6 @@ class TestRelayStaticSharding(StepsSharding):
for pubsub_topic in PUBSUB_TOPICS_SAME_CLUSTER:
self.check_publish_fails_on_not_subscribed_pubsub_topic(pubsub_topic)
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1034")
def test_unsubscribe_from_all_pubsub_topics_one_by_one(self):
self.setup_main_relay_nodes(cluster_id=self.auto_cluster, pubsub_topic=self.test_pubsub_topic)
self.subscribe_main_relay_nodes(pubsub_topics=PUBSUB_TOPICS_SAME_CLUSTER)
@ -84,7 +82,6 @@ class TestRelayStaticSharding(StepsSharding):
for pubsub_topic in PUBSUB_TOPICS_SAME_CLUSTER:
self.check_publish_fails_on_not_subscribed_pubsub_topic(pubsub_topic)
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1034")
def test_resubscribe_to_unsubscribed_pubsub_topics(self):
self.setup_main_relay_nodes(cluster_id=self.auto_cluster, pubsub_topic=self.test_pubsub_topic)
self.subscribe_main_relay_nodes(pubsub_topics=PUBSUB_TOPICS_SAME_CLUSTER)

View File

@ -9,10 +9,6 @@ from src.test_data import CONTENT_TOPICS_DIFFERENT_SHARDS, CONTENT_TOPICS_SHARD_
logger = get_custom_logger(__name__)
@pytest.mark.skipif(
"go-waku" in NODE_1 or "go-waku" in NODE_2,
reason="Autosharding tests work only on nwaku because of https://github.com/waku-org/go-waku/issues/1061",
)
class TestRunningNodesAutosharding(StepsSharding):
@pytest.mark.parametrize("content_topic", CONTENT_TOPICS_DIFFERENT_SHARDS)
def test_single_content_topic(self, content_topic):

View File

@ -43,13 +43,11 @@ class TestRunningNodesStaticSharding(StepsSharding):
assert "Not Found" in str(ex)
@pytest.mark.parametrize("content_topic", ["/toychat/2/huilong/proto", "/aaaaa/3/bbbbb/proto"])
@pytest.mark.skipif("go-waku" in NODE_2, reason="Test doesn't work on go-waku")
def test_content_topic_also_in_docker_flags(self, content_topic):
self.setup_main_relay_nodes(pubsub_topic=self.test_pubsub_topic, content_topic=content_topic)
self.subscribe_main_relay_nodes(pubsub_topics=[self.test_pubsub_topic])
self.check_published_message_reaches_relay_peer(pubsub_topic=self.test_pubsub_topic)
# Bug reported: https://github.com/waku-org/go-waku/issues/1034#issuecomment-2011350765
def test_pubsub_topic_not_in_docker_flags(self):
self.setup_main_relay_nodes(cluster_id=2)
self.subscribe_main_relay_nodes(pubsub_topics=[self.test_pubsub_topic])

View File

@ -17,7 +17,6 @@ class TestApiFlags(StepsStore):
self.publish_message()
self.check_published_message_is_stored(store_node=self.store_node1, peer_addr=self.multiaddr_list[0])
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_store_with_wrongPeerAddr(self):
self.publish_message()
wrong_peer_addr = self.multiaddr_list[0][1:]

View File

@ -5,21 +5,19 @@ from src.node.store_response import StoreResponse
from src.steps.store import StepsStore
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1109")
@pytest.mark.usefixtures("node_setup")
class TestCursor(StepsStore):
# we implicitly test the reusabilty of the cursor for multiple nodes
@pytest.mark.parametrize("cursor_index, message_count", [[2, 4], [3, 20], [10, 40], [19, 20], [19, 50], [110, 120]])
def test_different_cursor_and_indexes(self, cursor_index, message_count):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
cursor = ""
cursor_index = cursor_index if cursor_index < 100 else 100
for i in range(message_count):
message = self.create_message(payload=to_base64(f"Message_{i}"))
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
store_response = self.get_messages_from_store(node, page_size=cursor_index)
assert len(store_response.messages) == cursor_index
@ -63,7 +61,6 @@ class TestCursor(StepsStore):
wrong_message = self.create_message(payload=to_base64("test"))
cursor = {}
cursor["nwaku"] = self.compute_message_hash(self.test_pubsub_topic, wrong_message, hash_type="hex")
cursor["gowaku"] = self.compute_message_hash(self.test_pubsub_topic, wrong_message, hash_type="base64")
for node in self.store_nodes:
try:
self.get_messages_from_store(node, page_size=100, cursor=cursor[node.type()])
@ -126,7 +123,6 @@ class TestCursor(StepsStore):
deleted_message = self.create_message(payload=to_base64("Deleted_Message"))
cursor = {}
cursor["nwaku"] = self.compute_message_hash(self.test_pubsub_topic, deleted_message, hash_type="hex")
cursor["gowaku"] = self.compute_message_hash(self.test_pubsub_topic, deleted_message, hash_type="base64")
# Test the store response
for node in self.store_nodes:
@ -139,12 +135,11 @@ class TestCursor(StepsStore):
# Test if the API returns the expected messages when the cursor points to the first message in the store.
def test_cursor_equal_to_first_message(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
for i in range(10):
message = self.create_message(payload=to_base64(f"Message_{i}"))
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
cursor = message_hash_list[node.type()][0] # Cursor points to the first message

View File

@ -5,7 +5,6 @@ from src.node.store_response import StoreResponse
from src.steps.store import StepsStore
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1109")
@pytest.mark.usefixtures("node_setup")
class TestCursorManyMessages(StepsStore):
# we implicitly test the reusabilty of the cursor for multiple nodes
@ -13,12 +12,11 @@ class TestCursorManyMessages(StepsStore):
@pytest.mark.timeout(540)
@pytest.mark.store2000
def test_get_multiple_2000_store_messages(self):
expected_message_hash_list = {"nwaku": [], "gowaku": []}
expected_message_hash_list = {"nwaku": []}
for i in range(2000):
message = self.create_message(payload=to_base64(f"Message_{i}"))
self.publish_message(message=message)
expected_message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
expected_message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
store_response = StoreResponse({"paginationCursor": "", "pagination_cursor": ""}, self.store_node1)
response_message_hash_list = []
while store_response.pagination_cursor is not None:

View File

@ -11,7 +11,6 @@ logger = get_custom_logger(__name__)
@pytest.mark.usefixtures("node_setup")
class TestGetMessages(StepsStore):
# only one test for store v1, all other tests are using the new store v3
@pytest.mark.skipif("go-waku" in NODE_2, reason="Test works only with nwaku")
def test_legacy_store_v1(self):
self.publish_message()
for node in self.store_nodes:
@ -77,12 +76,11 @@ class TestGetMessages(StepsStore):
assert len(self.store_response.messages) == 1
def test_get_multiple_store_messages(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
for payload in SAMPLE_INPUTS:
message = self.create_message(payload=to_base64(payload["value"]))
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
store_response = self.get_messages_from_store(node, page_size=50)
assert len(store_response.messages) == len(SAMPLE_INPUTS)

View File

@ -8,16 +8,14 @@ from src.test_data import SAMPLE_INPUTS
logger = get_custom_logger(__name__)
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1109")
@pytest.mark.usefixtures("node_setup")
class TestHashes(StepsStore):
def test_store_with_hashes(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
for payload in SAMPLE_INPUTS:
message = self.create_message(payload=to_base64(payload["value"]))
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
for message_hash in message_hash_list[node.type()]:
store_response = self.get_messages_from_store(node, hashes=message_hash, page_size=50)
@ -25,12 +23,11 @@ class TestHashes(StepsStore):
assert store_response.message_hash(0) == message_hash
def test_store_with_multiple_hashes(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
for payload in SAMPLE_INPUTS:
message = self.create_message(payload=to_base64(payload["value"]))
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
store_response = self.get_messages_from_store(
node, hashes=f"{message_hash_list[node.type()][0]},{message_hash_list[node.type()][4]}", page_size=50
@ -44,7 +41,6 @@ class TestHashes(StepsStore):
self.publish_message(message=self.create_message(payload=to_base64(f"Message_{i}")))
wrong_hash = {}
wrong_hash["nwaku"] = self.compute_message_hash(self.test_pubsub_topic, self.create_message(payload=to_base64("test")), hash_type="hex")
wrong_hash["gowaku"] = self.compute_message_hash(self.test_pubsub_topic, self.create_message(payload=to_base64("test")), hash_type="base64")
for node in self.store_nodes:
store_response = self.get_messages_from_store(node, hashes=wrong_hash[node.type()], page_size=50)
assert not store_response.messages, "Messages found"
@ -97,13 +93,12 @@ class TestHashes(StepsStore):
# Test the behavior when you supply an empty hash alongside valid hashes.
def test_store_with_empty_and_valid_hash(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
for i in range(4):
message = self.create_message(payload=to_base64(f"Message_{i}"))
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
empty_hash = ""
for node in self.store_nodes:
@ -129,12 +124,11 @@ class TestHashes(StepsStore):
# Test when duplicate valid hashes are provided.
def test_store_with_duplicate_hashes(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
for i in range(4):
message = self.create_message(payload=to_base64(f"Message_{i}"))
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
# Use the same hash twice

View File

@ -45,7 +45,6 @@ class TestPageSize(StepsStore):
store_response = self.get_messages_from_store(node, page_size=1000000)
assert len(store_response.messages) == 100, "Message count mismatch"
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_negative_number_page_size(self):
page_size = -1
for i in range(10):

View File

@ -15,9 +15,6 @@ class TestReliability(StepsStore):
store_response = self.get_messages_from_store(self.store_node1, page_size=5)
assert len(store_response.messages) == 1
except Exception as ex:
if self.store_node1.is_gowaku():
assert "failed to dial" in str(ex) or "connection failed" in str(ex)
else:
raise AssertionError(f"Nwaku failed with {ex}")
def test_publishing_node_restarts(self, node_setup):

View File

@ -32,7 +32,6 @@ class TestRunningNodes(StepsStore):
self.publish_message()
self.check_published_message_is_stored(page_size=5, ascending="true")
@pytest.mark.skipif("go-waku" in NODE_2, reason="Not supported. See: https://github.com/waku-org/go-waku/issues/1106")
def test_main_node_only_relay__peer_relay_and_store(self):
self.setup_first_publishing_node(store="false", relay="true")
self.setup_first_store_node(store="true", relay="true")
@ -40,7 +39,6 @@ class TestRunningNodes(StepsStore):
self.publish_message()
self.check_published_message_is_stored(page_size=5, ascending="true")
@pytest.mark.skipif("go-waku" in NODE_2, reason="Not supported. See: https://github.com/waku-org/go-waku/issues/1106")
def test_main_node_only_relay__peer_only_store(self):
self.setup_first_publishing_node(store="false", relay="true")
self.setup_first_store_node(store="true", relay="false")
@ -48,7 +46,6 @@ class TestRunningNodes(StepsStore):
self.publish_message()
self.check_store_returns_empty_response()
@pytest.mark.skipif("go-waku" in NODE_2, reason="Not supported. See: https://github.com/waku-org/go-waku/issues/1106")
def test_main_node_only_relay__peer_only_relay(self):
self.setup_first_publishing_node(store="false", relay="true")
self.setup_first_store_node(store="false", relay="true")

View File

@ -10,12 +10,11 @@ logger = get_custom_logger(__name__)
class TestSorting(StepsStore):
@pytest.mark.parametrize("ascending", ["true", "false"])
def test_store_sort_ascending(self, ascending):
expected_message_hash_list = {"nwaku": [], "gowaku": []}
expected_message_hash_list = {"nwaku": []}
for i in range(10):
message = self.create_message(payload=to_base64(f"Message_{i}"))
self.publish_message(message=message)
expected_message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
expected_message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
store_response = self.get_messages_from_store(node, page_size=5, ascending=ascending)
response_message_hash_list = []
@ -27,13 +26,12 @@ class TestSorting(StepsStore):
assert response_message_hash_list == expected_message_hash_list[node.type()][5:], "Message hash mismatch for descending order"
def test_store_invalid_ascending(self):
expected_message_hash_list = {"nwaku": [], "gowaku": []}
expected_message_hash_list = {"nwaku": []}
ascending = "##"
for i in range(4):
message = self.create_message(payload=to_base64(f"Message_{i}"))
self.publish_message(message=message)
expected_message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
expected_message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
logger.debug(f"requesting stored messages with invalid ascending ={ascending}")
for node in self.store_nodes:
store_response = self.get_messages_from_store(node, ascending=ascending, page_size=2)

View File

@ -39,13 +39,12 @@ class TestTimeFilter(StepsStore):
assert not success_timestamps, f"Timestamps succeeded: {success_timestamps}"
def test_time_filter_matches_one_message(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
ts_pass = self.get_time_list_pass()
for timestamp in ts_pass:
message = self.create_message(timestamp=timestamp["value"])
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
store_response = self.get_messages_from_store(
node,
@ -57,13 +56,12 @@ class TestTimeFilter(StepsStore):
assert store_response.message_hash(0) == message_hash_list[node.type()][0], "Incorrect messaged filtered based on time"
def test_time_filter_matches_multiple_messages(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
ts_pass = self.get_time_list_pass()
for timestamp in ts_pass:
message = self.create_message(timestamp=timestamp["value"])
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
store_response = self.get_messages_from_store(
node,
@ -90,13 +88,12 @@ class TestTimeFilter(StepsStore):
assert not store_response.messages, "Message count mismatch"
def test_time_filter_start_time_equals_end_time(self):
message_hash_list = {"nwaku": [], "gowaku": []}
message_hash_list = {"nwaku": []}
ts_pass = self.get_time_list_pass()
for timestamp in ts_pass:
message = self.create_message(timestamp=timestamp["value"])
self.publish_message(message=message)
message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
for node in self.store_nodes:
store_response = self.get_messages_from_store(
node,
@ -107,7 +104,6 @@ class TestTimeFilter(StepsStore):
assert len(store_response.messages) == 1, "Message count mismatch"
assert store_response.message_hash(0) == message_hash_list[node.type()][0], "Incorrect messaged filtered based on time"
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_time_filter_start_time_after_end_time(self):
ts_pass = self.get_time_list_pass()
start_time = ts_pass[4]["value"] # 2 sec Future
@ -150,7 +146,6 @@ class TestTimeFilter(StepsStore):
logger.debug(f"number of messages stored for " f"start time = {start_time} is {len(store_response.messages)}")
assert len(store_response.messages) == 6, "number of messages retrieved doesn't match time filter "
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_time_filter_zero_start_end_time(self):
ts_pass = self.get_time_list_pass()
for timestamp in ts_pass:
@ -221,7 +216,6 @@ class TestTimeFilter(StepsStore):
assert len(store_response.messages) == 6, "number of messages retrieved doesn't match time filter "
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_time_filter_negative_end_time(self):
ts_pass = self.get_time_list_pass()
for timestamp in ts_pass:
@ -235,7 +229,6 @@ class TestTimeFilter(StepsStore):
assert len(store_response.messages) == 6, "number of messages retrieved doesn't match time filter "
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_time_filter_zero_end_time(self):
ts_pass = self.get_time_list_pass()
for timestamp in ts_pass:

View File

@ -8,16 +8,14 @@ from src.test_data import PUBSUB_TOPICS_STORE
logger = get_custom_logger(__name__)
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/go-waku/issues/1108")
class TestTopics(StepsStore):
@pytest.fixture(scope="function", autouse=True)
def topics_setup(self, node_setup):
self.message_hash_list = {"nwaku": [], "gowaku": []}
self.message_hash_list = {"nwaku": []}
for content_topic in CONTENT_TOPICS_DIFFERENT_SHARDS:
message = self.create_message(contentTopic=content_topic)
self.publish_message(message=message)
self.message_hash_list["nwaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="hex"))
self.message_hash_list["gowaku"].append(self.compute_message_hash(self.test_pubsub_topic, message, hash_type="base64"))
def test_store_with_one_content_topic(self):
for node in self.store_nodes:

View File

@ -13,7 +13,6 @@ In those tests we aim to combine multiple protocols/node types and create a more
"""
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
class TestStoreSync(StepsStore):
@pytest.fixture(scope="function", autouse=True)
def nodes(self):
@ -365,7 +364,7 @@ class TestStoreSync(StepsStore):
self.node2.set_relay_subscriptions([self.test_pubsub_topic])
self.node3.set_relay_subscriptions([self.test_pubsub_topic])
expected_message_hash_list = {"nwaku": [], "gowaku": []}
expected_message_hash_list = {"nwaku": []}
for _ in range(500): # total 1500 messages
messages = [self.create_message() for _ in range(3)]
@ -374,9 +373,6 @@ class TestStoreSync(StepsStore):
self.publish_message(sender=node, via="relay", message=messages[i], message_propagation_delay=0.01)
expected_message_hash_list["nwaku"].extend([self.compute_message_hash(self.test_pubsub_topic, msg, hash_type="hex") for msg in messages])
expected_message_hash_list["gowaku"].extend(
[self.compute_message_hash(self.test_pubsub_topic, msg, hash_type="base64") for msg in messages]
)
delay(5) # wait for the sync to finish
@ -444,7 +440,6 @@ class TestStoreSync(StepsStore):
store_sync_interval=1,
store_sync_range=10,
store_sync_relay_jitter=1,
store_sync_max_payload_size=1000,
relay="true",
)
self.node2.start(
@ -453,7 +448,6 @@ class TestStoreSync(StepsStore):
store_sync_interval=1,
store_sync_range=10,
store_sync_relay_jitter=1,
store_sync_max_payload_size=1000,
relay="true",
discv5_bootstrap_node=self.node1.get_enr_uri(),
)
@ -463,7 +457,6 @@ class TestStoreSync(StepsStore):
store_sync_interval=1,
store_sync_range=10,
store_sync_relay_jitter=1,
store_sync_max_payload_size=1000,
relay="true",
discv5_bootstrap_node=self.node2.get_enr_uri(),
)