mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-09 09:23:10 +00:00
fix: add lightpush case to publish_message
This commit is contained in:
parent
f9693755d0
commit
00eeaa553e
@ -111,7 +111,7 @@ class StepsRLN(StepsCommon):
|
||||
raise
|
||||
|
||||
@allure.step
|
||||
def publish_message(self, message=None, pubsub_topic=None, sender=None):
|
||||
def publish_message(self, message=None, pubsub_topic=None, sender=None, use_lightpush=False):
|
||||
if message is None:
|
||||
message = self.create_message()
|
||||
if pubsub_topic is None:
|
||||
@ -119,18 +119,11 @@ class StepsRLN(StepsCommon):
|
||||
if not sender:
|
||||
sender = self.node1
|
||||
|
||||
sender.send_relay_message(message, pubsub_topic)
|
||||
|
||||
def publish_light_push_message(self, message=None, pubsub_topic=None, sender=None):
|
||||
if message is None:
|
||||
message = self.create_message()
|
||||
if pubsub_topic is None:
|
||||
pubsub_topic = self.test_pubsub_topic
|
||||
if not sender:
|
||||
sender = self.node1
|
||||
|
||||
payload = self.create_payload(pubsub_topic, message)
|
||||
sender.send_light_push_message(payload)
|
||||
if use_lightpush:
|
||||
payload = self.create_payload(pubsub_topic, message)
|
||||
sender.send_light_push_message(payload)
|
||||
else:
|
||||
sender.send_relay_message(message, pubsub_topic)
|
||||
|
||||
@allure.step
|
||||
def ensure_relay_subscriptions_on_nodes(self, node_list, pubsub_topic_list):
|
||||
|
||||
@ -184,7 +184,7 @@ class TestRelayRLN(StepsRLN, StepsRelay):
|
||||
message = self.create_message(payload=to_base64(payload["value"]))
|
||||
try:
|
||||
now = math.trunc(time())
|
||||
self.publish_light_push_message(message=message, sender=self.light_push_node2)
|
||||
self.publish_message(message=message, sender=self.light_push_node2, use_lightpush=True)
|
||||
if i > 0 and (now - previous) == 0:
|
||||
raise AssertionError("Publish with RLN enabled at spam rate worked!!!")
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user