(self, env)
| 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 |
| 157 | domain = self.test_domain |
| 158 | domains = [domain, 'www.%s' % domain] |
| 159 | testpath = os.path.join(env.gen_dir, 'test_901_010') |
| 160 | env.mkpath(testpath) |
| 161 | # cert that is only 20 more days valid |
| 162 | creds = env.create_self_signed_cert(CertificateSpec(domains=domains), |
| 163 | valid_from=timedelta(days=-70), |
| 164 | valid_to=timedelta(days=20), |
| 165 | serial=901010) |
| 166 | cert_file = os.path.join(testpath, 'pubcert.pem') |
| 167 | pkey_file = os.path.join(testpath, 'privkey.pem') |
| 168 | creds.save_cert_pem(cert_file) |
| 169 | creds.save_pkey_pem(pkey_file) |
| 170 | conf = MDConf(env) |
| 171 | conf.add(f"MDMessageCmd {self.mcmd} {self.mlog}") |
| 172 | conf.start_md(domains) |
| 173 | conf.add(f"MDCertificateFile {cert_file}") |
| 174 | conf.add(f"MDCertificateKeyFile {pkey_file}") |
| 175 | conf.end_md() |
| 176 | conf.add_vhost(domain) |
| 177 | conf.install() |
| 178 | assert env.apache_restart() == 0, f'{env.apachectl_stderr}' |
| 179 | assert not os.path.isfile(self.mlog) |
| 180 | |
| 181 | def test_md_901_011(self, env): |
| 182 | # MD with static cert files, lifetime in warn window, check message |
nothing calls this directly
no test coverage detected