mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 22:44:10 -04:00
Don't bomb out on direct key fetches as soon as one fails
This commit is contained in:
parent
06a1f3e207
commit
def5ea4062
2 changed files with 41 additions and 29 deletions
|
@ -25,11 +25,7 @@ from twisted.internet import defer
|
|||
|
||||
from synapse.api.errors import SynapseError
|
||||
from synapse.crypto import keyring
|
||||
from synapse.crypto.keyring import (
|
||||
KeyLookupError,
|
||||
PerspectivesKeyFetcher,
|
||||
ServerKeyFetcher,
|
||||
)
|
||||
from synapse.crypto.keyring import PerspectivesKeyFetcher, ServerKeyFetcher
|
||||
from synapse.storage.keys import FetchKeyResult
|
||||
from synapse.util import logcontext
|
||||
from synapse.util.logcontext import LoggingContext
|
||||
|
@ -364,9 +360,11 @@ class ServerKeyFetcherTestCase(unittest.HomeserverTestCase):
|
|||
bytes(res["key_json"]), canonicaljson.encode_canonical_json(response)
|
||||
)
|
||||
|
||||
# change the server name: it should cause a rejection
|
||||
# change the server name: the result should be ignored
|
||||
response["server_name"] = "OTHER_SERVER"
|
||||
self.get_failure(fetcher.get_keys(keys_to_fetch), KeyLookupError)
|
||||
|
||||
keys = self.get_success(fetcher.get_keys(keys_to_fetch))
|
||||
self.assertEqual(keys, {})
|
||||
|
||||
|
||||
class PerspectivesKeyFetcherTestCase(unittest.HomeserverTestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue