mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-02 14:03:08 +00:00
chore: fix interop tests (#128)
This commit is contained in:
parent
c230f4b4c4
commit
a8ed2e8856
@ -473,7 +473,6 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
|
||||
assert len(messages_response) == 1, "message counter isn't as expected "
|
||||
|
||||
def test_store_no_peer_selected(self):
|
||||
store_version = "v3"
|
||||
logger.debug("Start 5 nodes")
|
||||
self.node4 = WakuNode(NODE_2, f"node3_{self.test_id}")
|
||||
self.node5 = WakuNode(NODE_2, f"node4_{self.test_id}")
|
||||
@ -501,14 +500,6 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
|
||||
self.publish_message(sender=self.node4)
|
||||
logger.debug("Check if node3 can inquiry stored message without stor peer specified")
|
||||
store_response = self.node3.get_store_messages(
|
||||
pubsub_topic=self.test_pubsub_topic, content_topics=self.test_content_topic, page_size=5, ascending="true", store_v=store_version
|
||||
pubsub_topic=self.test_pubsub_topic, content_topics=self.test_content_topic, page_size=5, ascending="true"
|
||||
)
|
||||
assert len(store_response["messages"]) == 1, "Can't find stored message!!"
|
||||
|
||||
logger.debug("Repeat publish and store inquiry but using store v1")
|
||||
store_version = "v1"
|
||||
self.publish_message(sender=self.node4)
|
||||
|
||||
logger.debug("Check if node3 can inquiry stored message without stor peer specified")
|
||||
store_response = self.node3.get_store_messages(pubsub_topic=self.test_pubsub_topic, page_size=5, ascending="true", store_v=store_version)
|
||||
assert len(store_response["messages"]) == 2, "Can't find stored message!!"
|
||||
|
||||
@ -37,22 +37,14 @@ class TestRunningNodesAutosharding(StepsSharding):
|
||||
self.setup_second_relay_node(cluster_id=self.auto_cluster, content_topic="/newsService/1.0/alerts/xml")
|
||||
self.subscribe_first_relay_node(content_topics=["/newsService/1.0/weekly/protobuf"])
|
||||
self.subscribe_second_relay_node(content_topics=["/newsService/1.0/alerts/xml"])
|
||||
try:
|
||||
self.check_published_message_reaches_relay_peer(content_topic="/newsService/1.0/weekly/protobuf")
|
||||
raise AssertionError("Publish on different content topic worked!!!")
|
||||
except Exception as ex:
|
||||
assert "Not Found" in str(ex)
|
||||
self.check_published_message_reaches_relay_peer(content_topic="/newsService/1.0/weekly/protobuf")
|
||||
|
||||
def test_2_nodes_different_content_topic_different_shard(self):
|
||||
self.setup_first_relay_node_with_filter(cluster_id=self.auto_cluster, content_topic="/myapp/1/latest/proto")
|
||||
self.setup_second_relay_node(cluster_id=self.auto_cluster, content_topic="/waku/2/content/test.js")
|
||||
self.subscribe_first_relay_node(content_topics=["/myapp/1/latest/proto"])
|
||||
self.subscribe_second_relay_node(content_topics=["/waku/2/content/test.js"])
|
||||
try:
|
||||
self.check_published_message_reaches_relay_peer(content_topic="/myapp/1/latest/proto")
|
||||
raise AssertionError("Publish on different content topic worked!!!")
|
||||
except Exception as ex:
|
||||
assert "Not Found" in str(ex)
|
||||
self.check_published_message_reaches_relay_peer(content_topic="/myapp/1/latest/proto")
|
||||
|
||||
def test_content_topic_not_in_docker_flags(self):
|
||||
self.setup_main_relay_nodes(cluster_id=2, pubsub_topic=self.test_pubsub_topic)
|
||||
|
||||
@ -10,7 +10,7 @@ logger = get_custom_logger(__name__)
|
||||
class TestRunningNodesStaticSharding(StepsSharding):
|
||||
@pytest.mark.parametrize("pubsub_topic", PUBSUB_TOPICS_DIFFERENT_CLUSTERS)
|
||||
def test_single_pubsub_topic(self, pubsub_topic):
|
||||
self.setup_main_relay_nodes(pubsub_topic=pubsub_topic, shard=["0", "1", "999"])
|
||||
self.setup_main_relay_nodes(pubsub_topic=pubsub_topic)
|
||||
self.subscribe_main_relay_nodes(pubsub_topics=[pubsub_topic])
|
||||
self.check_published_message_reaches_relay_peer(pubsub_topic=pubsub_topic)
|
||||
|
||||
|
||||
@ -10,13 +10,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
|
||||
def test_legacy_store_v1(self):
|
||||
self.publish_message()
|
||||
for node in self.store_nodes:
|
||||
store_response = node.get_store_messages(pubsub_topic=self.test_pubsub_topic, page_size=5, ascending="true", store_v="v1")
|
||||
assert len(store_response["messages"]) == 1
|
||||
|
||||
def test_get_store_messages_with_different_payloads(self):
|
||||
failed_payloads = []
|
||||
for payload in SAMPLE_INPUTS:
|
||||
|
||||
@ -21,6 +21,7 @@ class TestStoreSync(StepsStore):
|
||||
self.node3 = WakuNode(NODE_1, f"node3_{self.test_id}")
|
||||
self.num_messages = 10
|
||||
|
||||
@pytest.mark.skip("This test doesn not work as expected, will be fixed by @aya")
|
||||
def test_sync_nodes_are_relay(self):
|
||||
self.node1.start(store="true", relay="true")
|
||||
self.node2.start(store="false", store_sync="true", relay="true", discv5_bootstrap_node=self.node1.get_enr_uri())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user