MCPcopy Create free account
hub / github.com/apache/httpd / test_md_920_020

Method test_md_920_020

test/modules/md/test_920_status.py:225–263  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

223
224 # MD with 2 certificates
225 def test_md_920_020(self, env):
226 domain = self.test_domain
227 domains = [domain]
228 conf = MDConf(env)
229 conf.add("MDStapling on")
230 conf.add("MDPrivateKeys secp256r1 RSA")
231 conf.add_md(domains)
232 conf.add_vhost(domain)
233 conf.install()
234 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
235 assert env.await_completion([domain], restart=False)
236 # In the stats JSON, we expect 2 certificates under 'renewal'
237 stat = env.get_md_status(domain)
238 assert 'renewal' in stat
239 assert 'cert' in stat['renewal']
240 assert 'rsa' in stat['renewal']['cert']
241 assert 'secp256r1' in stat['renewal']['cert']
242 # In /.httpd/certificate-status 'renewal' we expect 2 certificates
243 status = env.get_certificate_status(domain)
244 assert 'renewal' in status
245 assert 'cert' in status['renewal']
246 assert 'secp256r1' in status['renewal']['cert']
247 assert 'rsa' in status['renewal']['cert']
248 # restart and activate
249 # once activated, certs are listed in status
250 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
251 stat = env.get_md_status(domain)
252 assert 'cert' in stat
253 assert 'valid' in stat['cert']
254 for ktype in ['rsa', 'secp256r1']:
255 assert ktype in stat['cert']
256 if env.acme_server == 'boulder':
257 assert 'ocsp' in stat['cert'][ktype]
258 #
259 env.httpd_error_log.ignore_recent(
260 matches = [
261 r'.*certificate with serial \w+ has no OCSP responder URL.*'
262 ]
263 )

Callers

nothing calls this directly

Calls 10

add_mdMethod · 0.95
MDConfClass · 0.85
addMethod · 0.80
add_vhostMethod · 0.80
installMethod · 0.80
apache_restartMethod · 0.80
await_completionMethod · 0.80
get_md_statusMethod · 0.80
ignore_recentMethod · 0.80

Tested by

no test coverage detected