mirror of
https://github.com/apache/httpd.git
synced 2026-10-23 22:49:01 +03:00
* test/pyhttpd/env.py (apache_fail): Check the exit code of the
"start" result rather than comparing the ExecResult to 0, which never matched, so a started server was never waited for and could race with the next test. * test/modules/md/test_300_conf_validate.py (test_md_300_011a, test_md_300_021): Expect the server to start, since an unmanaged vhost name only logs a warning; this was hidden by the broken apache_fail() check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> GitHub: closes #759 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938297 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -204,8 +204,7 @@ class TestConf:
|
||||
"not-forbidden.org", "test3.not-forbidden.org", "test4.not-forbidden.org"
|
||||
])
|
||||
conf.install()
|
||||
assert env.apache_fail() == 0
|
||||
env.apache_stop()
|
||||
assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
|
||||
env.httpd_error_log.ignore_recent([
|
||||
"AH10040" # A requested MD certificate will not match ServerName
|
||||
])
|
||||
@@ -344,13 +343,13 @@ class TestConf:
|
||||
"not.secret.com", "secret.com"
|
||||
])
|
||||
conf.install()
|
||||
assert env.apache_fail() == 0
|
||||
# this is unreliable on debian
|
||||
#assert env.httpd_error_log.scan_recent(
|
||||
# re.compile(r'.*Virtual Host not.secret.com:0 matches Managed Domain \'secret.com\', '
|
||||
# 'but the name/alias not.secret.com itself is not managed. A requested '
|
||||
# 'MD certificate will not match ServerName.*'), timeout=10
|
||||
#)
|
||||
assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
|
||||
env.httpd_error_log.ignore_recent(
|
||||
lognos = [
|
||||
"AH10040", # A requested MD certificate will not match ServerName
|
||||
"AH10105" # MD secret.com does not match any VirtualHost with 'SSLEngine on'
|
||||
]
|
||||
)
|
||||
|
||||
# test case: use MDRequireHttps in an <if> construct, but not in <Directory
|
||||
def test_md_300_022(self, env):
|
||||
|
||||
@@ -1009,12 +1009,10 @@ class HttpdTestEnv:
|
||||
rv = self._win_start()
|
||||
return 0 if rv != 0 else (0 if self.is_dead() else -1)
|
||||
self._run_apachectl("stop")
|
||||
rv = self._run_apachectl("start")
|
||||
if rv == 0:
|
||||
rv = 0 if self.is_dead() else -1
|
||||
else:
|
||||
rv = 0
|
||||
return rv
|
||||
r = self._run_apachectl("start")
|
||||
if r.exit_code == 0:
|
||||
return 0 if self.is_dead() else -1
|
||||
return 0
|
||||
|
||||
def apache_hard_restart(self) -> int:
|
||||
"""Restart without the "graceful" flag, so the MPM starts over."""
|
||||
|
||||
Reference in New Issue
Block a user