diff options
author | Rainer Jung <rjung@apache.org> | 2024-07-16 00:34:32 +0200 |
---|---|---|
committer | Rainer Jung <rjung@apache.org> | 2024-07-16 00:34:32 +0200 |
commit | f889bcb2285adfbfd3bc01ecc5c6764778c12953 (patch) | |
tree | 094cdc8c60aad754e58dbff4652b07c02b50b436 | |
parent | copy the trusted flag from the subrequest (diff) | |
download | apache2-f889bcb2285adfbfd3bc01ecc5c6764778c12953.tar.xz apache2-f889bcb2285adfbfd3bc01ecc5c6764778c12953.zip |
Make sure pytest shuts down the web server after each package
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919265 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | test/modules/core/conftest.py | 5 | ||||
-rw-r--r-- | test/modules/http1/conftest.py | 5 | ||||
-rwxr-xr-x | test/modules/md/conftest.py | 4 | ||||
-rw-r--r-- | test/modules/proxy/conftest.py | 5 | ||||
-rw-r--r-- | test/modules/tls/conftest.py | 5 |
5 files changed, 24 insertions, 0 deletions
diff --git a/test/modules/core/conftest.py b/test/modules/core/conftest.py index 22906efbb0..a14bdfb675 100644 --- a/test/modules/core/conftest.py +++ b/test/modules/core/conftest.py @@ -28,3 +28,8 @@ def env(pytestconfig) -> CoreTestEnv: env.apache_access_log_clear() env.httpd_error_log.clear_log() return env + +@pytest.fixture(autouse=True, scope="package") +def _stop_package_scope(env): + yield + assert env.apache_stop() == 0 diff --git a/test/modules/http1/conftest.py b/test/modules/http1/conftest.py index 33a16a1170..45b26c1796 100644 --- a/test/modules/http1/conftest.py +++ b/test/modules/http1/conftest.py @@ -34,3 +34,8 @@ def env(pytestconfig) -> H1TestEnv: env.apache_access_log_clear() env.httpd_error_log.clear_log() return env + +@pytest.fixture(autouse=True, scope="package") +def _stop_package_scope(env): + yield + assert env.apache_stop() == 0 diff --git a/test/modules/md/conftest.py b/test/modules/md/conftest.py index 0f9e4a9f49..a7b064b6a9 100755 --- a/test/modules/md/conftest.py +++ b/test/modules/md/conftest.py @@ -59,3 +59,7 @@ def acme(env): if acme_server is not None: acme_server.stop() +@pytest.fixture(autouse=True, scope="package") +def _stop_package_scope(env): + yield + assert env.apache_stop() == 0 diff --git a/test/modules/proxy/conftest.py b/test/modules/proxy/conftest.py index 7e6f4e7b09..c92e363e2a 100644 --- a/test/modules/proxy/conftest.py +++ b/test/modules/proxy/conftest.py @@ -29,3 +29,8 @@ def env(pytestconfig) -> ProxyTestEnv: env.apache_access_log_clear() env.httpd_error_log.clear_log() return env + +@pytest.fixture(autouse=True, scope="package") +def _stop_package_scope(env): + yield + assert env.apache_stop() == 0 diff --git a/test/modules/tls/conftest.py b/test/modules/tls/conftest.py index c7cb85877d..6f6f983cfd 100644 --- a/test/modules/tls/conftest.py +++ b/test/modules/tls/conftest.py @@ -31,3 +31,8 @@ def env(pytestconfig) -> TlsTestEnv: env.apache_access_log_clear() env.httpd_error_log.clear_log() return env + +@pytest.fixture(autouse=True, scope="package") +def _stop_package_scope(env): + yield + assert env.apache_stop() == 0 |