Skip to content

test: Add a pytest package for mod_http3 - #943

Open
mbeijen wants to merge 1 commit into
apache:trunkfrom
mbeijen:h3-tests
Open

mbeijen wants to merge 1 commit into
apache:trunkfrom
mbeijen:h3-tests

Conversation

@mbeijen

@mbeijen mbeijen commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

This adds test/modules/http3, a pyhttpd suite that sends requests over HTTP/3 with curl --http3-only to the QUIC listener on the https port number. It covers static files, HEAD, 404, a 1 MB response, several requests on one connection, vhost selection by Host, and CGI with POST bodies up to 1 MB.

It skips when mod_http3, mod_ssl or an HTTP/3-capable curl is missing, so it won't run in CI until a later PR adds a job for it.

  • This PR does not report or address a security vulnerability (see SECURITY.md and https://www.apache.org/security/#reporting-a-vulnerability).
  • Code follows the httpd style guide.
  • New log messages (level debug or higher) use an empty APLOGNO() tag; numbers are assigned by a committer at merge time (see docs/log-message-tags/README).
  • If the change is user-visible, a changes-entries/*.txt file is included, following the template in README.CHANGES (not needed otherwise).
  • Test cases based on pyhttpd are included where appropriate, in the test/modules/xxx directory matching the modules/xxx module source, or test/modules/core for core server changes. On Unix, verify these pass locally with e.g. make check-pytest PYTEST_DIRS=test/modules/xxx.

test/modules/http3 runs requests over HTTP/3 with curl --http3-only
against a QUIC listener on the https port number. It covers static
files, HEAD, 404, a 1 MB response, several requests on one connection,
virtual host selection by Host, POST content to CGI up to 1 MB and the
CGI environment.

The package is skipped when mod_http3, mod_ssl or curl's HTTP3 feature
is missing.

Generated-by: Claude Code (Claude Opus 5.5)
@jfclere

jfclere commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

it gives:
+++
modules/http3/test_001_get.py::TestGet::test_h3_001_01
modules/http3/test_002_cgi.py::TestCgi::test_h3_002_01
/home/jfclere/TMP/httpd-asf/test/.venv/lib64/python3.14/site-packages/_pytest/fixtures.py:1392: PytestRemovedIn10Warning: Class-scoped fixtures defined as instance methods are deprecated.
Instance attributes set in the '_class_scope' fixture will NOT be visible to test methods,
as each test gets a new instance while the fixture runs only once per class.
Use a @classmethod decorator below @pytest.fixture and set attributes on cls instead.
See https://docs.pytest.org/en/stable/deprecations.html#class-scoped-fixture-as-instance-method
fixturefunc = resolve_fixture_function(fixturedef, request)
+++
The fix is easy and that is just a warning.

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.

2 participants