Skip to content

Add pre-migration tests for networking internals#627

Draft
sandhose wants to merge 2 commits into
quenting/modernisation/modernise-depsfrom
quenting/modernisation/pre-migration-tests
Draft

Add pre-migration tests for networking internals#627
sandhose wants to merge 2 commits into
quenting/modernisation/modernise-depsfrom
quenting/modernisation/pre-migration-tests

Conversation

@sandhose
Copy link
Copy Markdown
Member

@sandhose sandhose commented Apr 4, 2026

Summary

Add test coverage for networking subsystems before the Twisted → aiohttp migration:

  • test_httpcommon.py: HTTP body size limiting (_ReadBodyWithMaxSizeProtocol, _DiscardBodyWithMaxSizeProtocol, SizeLimitingRequest)
  • test_srvresolver.py: SRV record resolution (pick_server_from_list, SrvResolver.resolve_service, caching, DNS errors)
  • test_wellknown.py: Matrix federation discovery chain (.well-known routing, cache control parsing, _route_matrix_uri)
  • test_blacklisting.py: IP blacklist/whitelist checking (IPv4, IPv6, link-local, loopback)
  • test_replication.py: Peer certificate CN validation (known/unknown/missing CN)

Test plan

  • uv run trial tests/ — 117 tests pass (+68 new)
  • CI green

Part 7 of 9 in the modernisation series. Builds on #626.

@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch from fd90959 to 9f02890 Compare April 4, 2026 15:12
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch 2 times, most recently from bfcbc87 to ddc1b01 Compare April 4, 2026 15:19
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch 3 times, most recently from e9d5495 to 8cff64d Compare April 4, 2026 15:43
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch from 8646127 to ac7409b Compare April 4, 2026 15:43
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch from 8cff64d to 004fd70 Compare April 4, 2026 15:45
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch 2 times, most recently from f0543f2 to 2866beb Compare April 4, 2026 15:56
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch 2 times, most recently from 13aa531 to 303eca6 Compare April 4, 2026 16:02
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch from 2866beb to 8ecd0db Compare April 4, 2026 16:02
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch from 303eca6 to 70d6161 Compare April 4, 2026 16:09
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch from 8ecd0db to 0a106f2 Compare April 4, 2026 16:09
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch 2 times, most recently from 79ecbe6 to 8c52197 Compare April 4, 2026 16:17
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch 2 times, most recently from 74cdcd4 to afba9b7 Compare April 4, 2026 16:19
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch 2 times, most recently from 7314d99 to 6be0d9a Compare April 4, 2026 16:26
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch 2 times, most recently from 7bb7b47 to 5b2e0e1 Compare April 4, 2026 16:28
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch from 6be0d9a to 3078564 Compare April 4, 2026 16:28
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch from 5b2e0e1 to dd0719c Compare April 4, 2026 16:34
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch from 3078564 to 6b44235 Compare April 4, 2026 16:34
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch from dd0719c to 7c3f88a Compare April 4, 2026 16:44
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch 2 times, most recently from ddd42cc to 377e703 Compare April 4, 2026 16:48
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch 2 times, most recently from ae0d8ed to bae2b6b Compare April 4, 2026 16:52
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch 2 times, most recently from 03c779e to f63c9b1 Compare April 4, 2026 19:59
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch 2 times, most recently from a50a7bb to 8a722b5 Compare April 4, 2026 20:02
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch from f63c9b1 to 239747c Compare April 4, 2026 20:02
@sandhose sandhose force-pushed the quenting/modernisation/modernise-deps branch from 8a722b5 to be2baf4 Compare April 4, 2026 20:07
@sandhose sandhose force-pushed the quenting/modernisation/pre-migration-tests branch from 239747c to 17e029a Compare April 4, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant