mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:26:02 -04:00
Use direct references for some configuration variables (#10798)
Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit).
This commit is contained in:
parent
9f111075e8
commit
01c88a09cd
66 changed files with 152 additions and 133 deletions
|
@ -23,10 +23,13 @@ class WellKnownTests(unittest.HomeserverTestCase):
|
|||
# replace the JsonResource with a WellKnownResource
|
||||
return WellKnownResource(self.hs)
|
||||
|
||||
@unittest.override_config(
|
||||
{
|
||||
"public_baseurl": "https://tesths",
|
||||
"default_identity_server": "https://testis",
|
||||
}
|
||||
)
|
||||
def test_well_known(self):
|
||||
self.hs.config.public_baseurl = "https://tesths"
|
||||
self.hs.config.default_identity_server = "https://testis"
|
||||
|
||||
channel = self.make_request(
|
||||
"GET", "/.well-known/matrix/client", shorthand=False
|
||||
)
|
||||
|
@ -35,14 +38,17 @@ class WellKnownTests(unittest.HomeserverTestCase):
|
|||
self.assertEqual(
|
||||
channel.json_body,
|
||||
{
|
||||
"m.homeserver": {"base_url": "https://tesths"},
|
||||
"m.homeserver": {"base_url": "https://tesths/"},
|
||||
"m.identity_server": {"base_url": "https://testis"},
|
||||
},
|
||||
)
|
||||
|
||||
@unittest.override_config(
|
||||
{
|
||||
"public_baseurl": None,
|
||||
}
|
||||
)
|
||||
def test_well_known_no_public_baseurl(self):
|
||||
self.hs.config.public_baseurl = None
|
||||
|
||||
channel = self.make_request(
|
||||
"GET", "/.well-known/matrix/client", shorthand=False
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue