(self, env)
| 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 |
nothing calls this directly
no test coverage detected