Handle Relay.publish for zero peers new error answer

Fix test cases where message does not reach relay peer fails due to braking change coming into LMN - when publish would return zero peer instead NoPeersToPublish error is propagated. Fix covers such checks properly. (#157)
This commit is contained in:
NagyZoltanPeter 2026-01-30 01:17:34 +01:00 committed by GitHub
parent 1a140e8473
commit 1712117ae8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,7 +195,13 @@ class StepsSharding(StepsRelay):
self.check_published_message_reaches_relay_peer(pubsub_topic=pubsub_topic, content_topic=content_topic)
raise AssertionError("Retrieving messages on not subscribed content topic worked!!!")
except Exception as ex:
assert "Not Found" in str(ex)
error_message = str(ex)
expected_errors = [
"Not Found",
"NoPeersToPublish",
"Failed to publish: publish failed in relay: NoPeersToPublish",
]
assert any(expected in error_message for expected in expected_errors), error_message
@allure.step
def check_publish_fails_on_not_subscribed_pubsub_topic(self, pubsub_topic):