Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions test/modules/md/test_300_conf_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ def test_md_300_011a(self, env):
"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
])
Expand Down Expand Up @@ -344,13 +343,13 @@ def test_md_300_021(self, env):
"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):
Expand Down
10 changes: 4 additions & 6 deletions test/pyhttpd/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,12 +1009,10 @@ def apache_fail(self):
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."""
Expand Down
Loading