summary refs log tree commit diff
path: root/tests/test_federation.py
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2022-10-03 14:53:29 -0500
committerGitHub <noreply@github.com>2022-10-03 14:53:29 -0500
commit70a4317692adcf7f1dacb201cda2188c8495bfa9 (patch)
treeaf5138513c713f6699b2e5dcb35bdfeaf9531f51 /tests/test_federation.py
parentDependabot changelog: don't require a changelog in lints (diff)
downloadsynapse-70a4317692adcf7f1dacb201cda2188c8495bfa9.tar.xz
Track when the pulled event signature fails (#13815)
Because we're doing the recording in `_check_sigs_and_hash_for_pulled_events_and_fetch` (previously named `_check_sigs_and_hash_and_fetch`), this means we will track signature failures for `backfill`, `get_room_state`, `get_event_auth`, and `get_missing_events` (all pulled event scenarios). And we also record signature failures from `get_pdu`.

Part of https://github.com/matrix-org/synapse/issues/13700

Part of https://github.com/matrix-org/synapse/issues/13676 and https://github.com/matrix-org/synapse/issues/13356

This PR will be especially important for https://github.com/matrix-org/synapse/pull/13816 so we can avoid the costly `_get_state_ids_after_missing_prev_event` down the line when `/messages` calls backfill.
Diffstat (limited to 'tests/test_federation.py')
-rw-r--r--tests/test_federation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_federation.py b/tests/test_federation.py
index 779fad1f63..80e5c590d8 100644
--- a/tests/test_federation.py
+++ b/tests/test_federation.py
@@ -86,8 +86,8 @@ class MessageAcceptTests(unittest.HomeserverTestCase):
 
         federation_event_handler._check_event_auth = _check_event_auth
         self.client = self.homeserver.get_federation_client()
-        self.client._check_sigs_and_hash_and_fetch = lambda dest, pdus, **k: succeed(
-            pdus
+        self.client._check_sigs_and_hash_for_pulled_events_and_fetch = (
+            lambda dest, pdus, **k: succeed(pdus)
         )
 
         # Send the join, it should return None (which is not an error)