From edf12b90cdae4b631557d8b510a0e55583f69e24 Mon Sep 17 00:00:00 2001 From: aya Date: Tue, 15 Oct 2024 12:42:18 +0300 Subject: [PATCH] try restore message with wrong peer id --- tests/store/test_api_flags.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/store/test_api_flags.py b/tests/store/test_api_flags.py index f208db77..da343956 100644 --- a/tests/store/test_api_flags.py +++ b/tests/store/test_api_flags.py @@ -24,6 +24,15 @@ class TestApiFlags(StepsStore): except Exception as ex: logger.debug(f" response with wrong peer address is { ex.args[0]}") assert ex.args[0].find("Invalid MultiAddress") != -1 + # try to send wrong peer id + wrong_peer_id = self.multiaddr_list[0][:-1] + logger.debug(f"logger is {wrong_peer_id}") + try: + self.check_published_message_is_stored(store_node=self.store_node1, peer_addr=wrong_peer_id) + raise Exception("message restored with wrong peer id") + except Exception as ex: + logger.debug(f" response with wrong peer id is { ex.args[0]}") + assert ex.args[0].find("Failed parsing remote peer info") != -1 def test_store_include_data(self): message_list = []