fix: Fetch nodeinfo endpoint address from .well-known/nodeinfo when checking instance availability
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2561>
This commit is contained in:
parent
cc0d642215
commit
e78191c917
3 changed files with 15 additions and 3 deletions
|
|
@ -669,7 +669,18 @@ def test_fetch_collection(mocker, r_mock):
|
|||
def test_check_all_remote_instance_reachable(factories, r_mock):
|
||||
domain = factories["federation.Domain"]()
|
||||
r_mock.get(
|
||||
f"https://{domain.name}/api/v1/instance/nodeinfo/2.0/", json={"version": "2"}
|
||||
f"https://{domain.name}/api/v1/instance/nodeinfo/2.0", json={"version": "2"}
|
||||
)
|
||||
r_mock.get(
|
||||
f"https://{domain.name}/.well-known/nodeinfo",
|
||||
json={
|
||||
"links": [
|
||||
{
|
||||
"rel": "http://nodeinfo.diaspora.software/ns/schema/2.0",
|
||||
"href": f"https://{domain.name}/api/v1/instance/nodeinfo/2.0",
|
||||
}
|
||||
]
|
||||
},
|
||||
)
|
||||
tasks.check_all_remote_instance_availability()
|
||||
domain = models.Domain.objects.get(name=domain.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue