mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-28 22:37:08 -04:00
Fix destination_is
errors seen in sentry. (#13041)
* Rename test_fedclient to match its source file * Require at least one destination to be truthy * Explicitly validate user ID in profile endpoint GETs Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
This commit is contained in:
parent
aef398457f
commit
c99b511db9
7 changed files with 59 additions and 8 deletions
|
@ -617,3 +617,17 @@ class FederationClientTests(HomeserverTestCase):
|
|||
self.assertIsInstance(f.value, RequestSendFailed)
|
||||
|
||||
self.assertTrue(transport.disconnecting)
|
||||
|
||||
def test_build_auth_headers_rejects_falsey_destinations(self) -> None:
|
||||
with self.assertRaises(ValueError):
|
||||
self.cl.build_auth_headers(None, b"GET", b"https://example.com")
|
||||
with self.assertRaises(ValueError):
|
||||
self.cl.build_auth_headers(b"", b"GET", b"https://example.com")
|
||||
with self.assertRaises(ValueError):
|
||||
self.cl.build_auth_headers(
|
||||
None, b"GET", b"https://example.com", destination_is=b""
|
||||
)
|
||||
with self.assertRaises(ValueError):
|
||||
self.cl.build_auth_headers(
|
||||
b"", b"GET", b"https://example.com", destination_is=b""
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue