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

Method test_md_901_020

test/modules/md/test_901_message.py:218–242  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

216 # MD, check messages from stapling
217 @pytest.mark.skipif(MDTestEnv.lacks_ocsp(), reason="no OCSP responder")
218 def test_md_901_020(self, env):
219 domain = self.test_domain
220 domains = [domain]
221 conf = MDConf(env)
222 conf.add(f"MDMessageCmd {self.mcmd} {self.mlog}")
223 conf.add_drive_mode("auto")
224 conf.add_md(domains)
225 conf.add("MDStapling on")
226 conf.add_vhost(domains)
227 conf.install()
228 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
229 assert env.await_completion([domain])
230 env.await_ocsp_status(domain)
231 assert env.await_file(self.mlog)
232 time.sleep(1)
233 nlines = open(self.mlog).readlines()
234 assert len(nlines) == 4
235 assert nlines[0].strip() == \
236 f"['{self.mcmd}', '{self.mlog}', 'challenge-setup:http-01:{domain}', '{domain}']"
237 assert nlines[1].strip() == \
238 f"['{self.mcmd}', '{self.mlog}', 'renewed', '{domain}']"
239 assert nlines[2].strip() == \
240 f"['{self.mcmd}', '{self.mlog}', 'installed', '{domain}']"
241 assert nlines[3].strip() == \
242 f"['{self.mcmd}', '{self.mlog}', 'ocsp-renewed', '{domain}']"
243
244 # test: while testing gh issue #146, it was noted that a failed renew notification never
245 # resets the MD activity.

Callers

nothing calls this directly

Calls 10

add_drive_modeMethod · 0.95
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
await_ocsp_statusMethod · 0.80
await_fileMethod · 0.80

Tested by

no test coverage detected