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

Method test_md_741_001

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

Source from the content-addressed store, hash-verified

27 self.test_domain = env.get_request_domain(request)
28
29 def test_md_741_001(self, env):
30 # setup an MD with a MDMessageCmd that make the http-01 challenge file invalid
31 # before the ACME server is asked to retrieve it. This will result in
32 # an "invalid" domain authorization.
33 # The certificate sign-up will be attempted again after 4 seconds and
34 # of course fail again.
35 # Verify that the error counter for the staging job increments, so
36 # that our retry logic goes into proper delayed backoff.
37 domain = self.test_domain
38 domains = [domain]
39 conf = MDConf(env)
40 conf.add("MDCAChallenges http-01")
41 conf.add(f"MDMessageCmd {self.mcmd} {env.store_dir}")
42 conf.add_md(domains)
43 conf.add_vhost(domains)
44 conf.install()
45 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
46 md = env.await_error(domain, errors=2, timeout=10)
47 assert md
48 assert md['renewal']['errors'] > 0
49 #
50 env.httpd_error_log.ignore_recent(
51 lognos = [
52 "AH10056" # CA considers answer to challenge invalid
53 ],
54 matches = [
55 r'.*The key authorization file from the server did not match this challenge.*',
56 r'.*CA considers answer to challenge invalid.*'
57 ]
58 )
59
60 # mess up the produced staging area before reload
61 def test_md_741_002(self, env):

Callers

nothing calls this directly

Calls 8

add_mdMethod · 0.95
MDConfClass · 0.85
addMethod · 0.80
add_vhostMethod · 0.80
installMethod · 0.80
apache_restartMethod · 0.80
await_errorMethod · 0.80
ignore_recentMethod · 0.80

Tested by

no test coverage detected