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

Method test_md_741_002

test/modules/md/test_741_setup_errors.py:61–84  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

59
60 # mess up the produced staging area before reload
61 def test_md_741_002(self, env):
62 domain = self.test_domain
63 domains = [domain]
64 conf = MDConf(env)
65 conf.add_md(domains)
66 conf.add_vhost(domains)
67 conf.install()
68 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
69 env.check_md(domains)
70 assert env.await_completion([domain], restart=False)
71 staged_md_path = env.store_staged_file(domain, 'md.json')
72 with open(staged_md_path, 'w') as fd:
73 fd.write('garbage\n')
74 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
75 assert env.await_completion([domain])
76 env.check_md_complete(domain)
77 env.httpd_error_log.ignore_recent(
78 lognos = [
79 "AH10069" # failed to load JSON file
80 ],
81 matches = [
82 r'.*failed to load JSON file.*',
83 ]
84 )

Callers

nothing calls this directly

Calls 10

add_mdMethod · 0.95
MDConfClass · 0.85
add_vhostMethod · 0.80
installMethod · 0.80
apache_restartMethod · 0.80
check_mdMethod · 0.80
await_completionMethod · 0.80
store_staged_fileMethod · 0.80
check_md_completeMethod · 0.80
ignore_recentMethod · 0.80

Tested by

no test coverage detected