mirror of
https://github.com/waku-org/waku-interop-tests.git
synced 2025-01-30 09:47:27 +00:00
03973b8897
* first commit * get message tests 1 * store tests with node restarts * reliability tests * store tests * fixes * more tests * fixes * new store tests * new store tests * adjustments * adjust tests for go-waku * postgress test * postgress test * fixes * small fixes * reliability updates * postgress test * adjsutmens for go-waku
28 lines
1.3 KiB
Python
28 lines
1.3 KiB
Python
import pytest
|
|
from src.libs.common import to_base64
|
|
from src.node.waku_message import WakuMessage
|
|
from src.steps.store import StepsStore
|
|
from src.test_data import SAMPLE_INPUTS
|
|
|
|
|
|
@pytest.mark.usefixtures("node_setup")
|
|
class TestApiFlags(StepsStore):
|
|
def test_store_with_peerAddr(self):
|
|
self.publish_message()
|
|
self.check_published_message_is_stored(store_node=self.store_node1, peer_addr=self.multiaddr_list[0])
|
|
|
|
def test_store_include_data(self):
|
|
message_list = []
|
|
for payload in SAMPLE_INPUTS:
|
|
message = self.create_message(payload=to_base64(payload["value"]))
|
|
self.publish_message(message=message)
|
|
message_list.append(message)
|
|
for node in self.store_nodes:
|
|
store_response = self.get_messages_from_store(node, include_data="true", page_size=50)
|
|
assert len(store_response.messages) == len(SAMPLE_INPUTS)
|
|
for index in range(len(store_response.messages)):
|
|
assert store_response.message_payload(index) == message_list[index]["payload"]
|
|
assert store_response.message_pubsub_topic(index) == self.test_pubsub_topic
|
|
waku_message = WakuMessage([store_response.message_at(index)])
|
|
waku_message.assert_received_message(message_list[index])
|