diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-02-11 11:16:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 11:16:54 -0500 |
commit | e40d88cff3cca3d5186d5f623ad1107bc403d69b (patch) | |
tree | 1bb8e1daa3f43099f535eb56dacd472edb78795e /tests | |
parent | Clarify documentation about escaping URLs in templates. (#9310) (diff) | |
download | synapse-e40d88cff3cca3d5186d5f623ad1107bc403d69b.tar.xz |
Backout changes for automatically calculating the public baseurl. (#9313)
This breaks some people's configurations (if their Client-Server API is not accessed via port 443).
Diffstat (limited to '')
-rw-r--r-- | tests/rest/client/v1/test_login.py | 4 | ||||
-rw-r--r-- | tests/rest/test_well_known.py | 9 | ||||
-rw-r--r-- | tests/utils.py | 1 |
3 files changed, 13 insertions, 1 deletions
diff --git a/tests/rest/client/v1/test_login.py b/tests/rest/client/v1/test_login.py index 66dfdaffbc..bfcb786af8 100644 --- a/tests/rest/client/v1/test_login.py +++ b/tests/rest/client/v1/test_login.py @@ -672,10 +672,12 @@ class CASTestCase(unittest.HomeserverTestCase): self.redirect_path = "_synapse/client/login/sso/redirect/confirm" config = self.default_config() + config["public_baseurl"] = ( + config.get("public_baseurl") or "https://matrix.goodserver.com:8448" + ) config["cas_config"] = { "enabled": True, "server_url": CAS_SERVER, - "service_url": "https://matrix.goodserver.com:8448", } cas_user_id = "username" diff --git a/tests/rest/test_well_known.py b/tests/rest/test_well_known.py index c5e44af9f7..14de0921be 100644 --- a/tests/rest/test_well_known.py +++ b/tests/rest/test_well_known.py @@ -40,3 +40,12 @@ class WellKnownTests(unittest.HomeserverTestCase): "m.identity_server": {"base_url": "https://testis"}, }, ) + + 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 + ) + + self.assertEqual(channel.code, 404) diff --git a/tests/utils.py b/tests/utils.py index 68033d7535..840b657f82 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -159,6 +159,7 @@ def default_config(name, parse=False): }, "rc_3pid_validation": {"per_second": 10000, "burst_count": 10000}, "saml2_enabled": False, + "public_baseurl": None, "default_identity_server": None, "key_refresh_interval": 24 * 60 * 60 * 1000, "old_signing_keys": {}, |