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

Method test_md_901_004

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

Source from the content-addressed store, hash-verified

128 # - messages only once
129 @pytest.mark.skipif(MDTestEnv.is_pebble(), reason="ACME server certs valid too long")
130 def test_md_901_004(self, env):
131 domain = self.test_domain
132 domains = [domain, "www." + domain]
133 conf = MDConf(env)
134 conf.add_md(domains)
135 conf.add_vhost(domains)
136 conf.install()
137 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
138 assert env.await_completion([domain])
139 # force renew
140 conf = MDConf(env)
141 conf.add(f"MDMessageCmd {self.mcmd} {self.mlog}")
142 conf.add("MDRenewWindow 120d")
143 conf.add("MDActivationDelay -7d")
144 conf.add_md(domains)
145 conf.add_vhost(domains)
146 conf.install()
147 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
148 assert env.await_completion([domain], restart=False)
149 env.get_md_status(domain)
150 assert env.await_file(self.mlog)
151 nlines = open(self.mlog).readlines()
152 assert len(nlines) == 1
153 assert nlines[0].strip() == f"['{self.mcmd}', '{self.mlog}', 'renewed', '{domain}']"
154
155 def test_md_901_010(self, env):
156 # MD with static cert files, lifetime in renewal window, no message about renewal

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected